#1 Re: Low level and performance » LZO and SynLZ compression units » 2015-03-21 16:41:55

Hi, thank you very much, SynLZ is very fast.
I used FlexCompress and SynLZ  for Oracle Database Backups on client PC:

  InputDataSize := Integer(CurrentBufPtr)-Integer(FBuffer);
  if TabArchiver.CompressionLevel=FlexCompress.clNone then begin
    CompressedSize := SynLZcompress1(FBuffer, InputDataSize, SynLZBuffer);
    ArchMemStream.WriteBuffer(SynLZBuffer^, CompressedSize); 
  end else
    ArchMemStream.WriteBuffer(FBuffer^, InputDataSize); 
  TabArchiver.ExtractToStream(FileName, LoadStream);
  L:=LoadStream.Size;
  if TabArchiver.LastCompressionMode=0 then begin
    P:=LoadStream.Memory;
    aUnCompressedSize:=SynLZdecompressdestlen(P);
    SynLZStream.Size := aUnCompressedSize;
    if (SynLZdecompress1(P,L,SynLZStream.Memory)<>aUnCompressedSize) then 
      RaiseMsgError('Invalid SynLZ decompress');
    CurrentBufPtr:=SynLZStream.Memory;
    L:=SynLZStream.Size;
  end else
    CurrentBufPtr:=LoadStream.Memory;

Size of backup FlexCompress(PPM+Max) is 2 times smaller than SynLZ.
Size of backup SynLZ is 3 times smaller than without compression
(input buffer  is very packed).

SynLZ compression+FlexCompress(Rijndael_256) is 18 times faster than FlexCompress(PPM+Max+Rijndael_256);
decompression time is 10 times faster, Rijndael_256 used in any case.
Compression time(SynLZ+Rijndael_256)=10% of Backup time. 90%=Fetch records
Compression time(PPM+Max+Rijndael_256)=70% of Backup time.

Board footer

Powered by FluxBB