Page 1 of 1

What should open zlib or LZMA compressed files?

Posted: Sun Mar 24, 2013 10:20 pm
by RichAlgeni
I guess I was under the mistaken impression that using UseLZMAPacker() or Importing ZLib would result in a file that could be opened on it's own by using 7zip.

This seems to be incorrect. Is it recommended that we use UseZipPacker() when we need external processes to be able to read and open the file?

Re: What should open zlib or LZMA compressed files?

Posted: Mon Mar 25, 2013 12:16 am
by skywalk
There are unique complex structures defined for each compression utility such as Zip and 7-Zip.
But, several utilities may use similar compression algorithms internally.
If you compress memory using LZMA or zlib and store the results to file, only your unique pattern can unlock it. :wink:

Re: What should open zlib or LZMA compressed files?

Posted: Mon Mar 25, 2013 12:25 am
by RichAlgeni
skywalk wrote: If you compress memory using LZMA or zlib and store the results to file, only your unique pattern can unlock it. :wink:
So we should use AddPackFile when we want to save compressed data to a file? And LZMA isn't supported in AddPackFile?

Thanks Steve!

Re: What should open zlib or LZMA compressed files?

Posted: Mon Mar 25, 2013 1:18 am
by skywalk
Not always. I don't use the Packer lib but I do store custom compressed data(password protected and encrypted) to file and can read it back since I know the structure used. For now, zlib import seems fastest for me, but not the best compression.
The LZMA implemented in the Packer lib does not expose compression ratios or dictionary sizes, so it's not a fair comparison. If those get added later, I will consider using the internal CompressMemory() cmd with #PB_Packer_LZMA.