What should open zlib or LZMA compressed files?

Everything else that doesn't fall into one of the other PB categories.
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

What should open zlib or LZMA compressed files?

Post 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?
User avatar
skywalk
Addict
Addict
Posts: 4316
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: What should open zlib or LZMA compressed files?

Post 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:
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: What should open zlib or LZMA compressed files?

Post 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!
User avatar
skywalk
Addict
Addict
Posts: 4316
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: What should open zlib or LZMA compressed files?

Post 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.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Post Reply