#1 2017-08-03 07:25:16

Chaa
Member
Registered: 2011-03-26
Posts: 245

FileSynLZ and SynLZDecompress

It's slightly disappoint that data compressed with FileSynLZ/StreamSynLZ cannot be decompressed with SynLZDecompress.

I use FileSynLZ to compress files. Then compressed files compiled into application resources.
But ResourceSynLZToRawByteString cannot load them.

Is this expected behavior?

Offline

#2 2017-08-03 08:04:19

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,359
Website

Re: FileSynLZ and SynLZDecompress

This is as expected: those are two diverse formats.
SynLZCompress/SynLZDecompress work on memory blocks, so have a limited size.
Whereas FileSynLZ/FileUnSynLZ will define a more elaborated format, the file in SynLZCompress/SynLZDecompress 128MB chunks, and allowing a header signature as UInt32.
So FileSynLZ/FileUnSynLZ purpose is to handle any size of file.

ResourceSynLZToRawByteString is expected to work on small blocks, so uses raw SynLZCompress/SynLZDecompress format.

Offline

#3 2017-08-03 10:23:51

Chaa
Member
Registered: 2011-03-26
Posts: 245

Re: FileSynLZ and SynLZDecompress

Thanks for clarification.

Offline

Board footer

Powered by FluxBB