Wow a stackoverflow question that hasn't been closed or removed for some trivial reason--thought I'd never see something like that again.
How are zlib, gzip and Zip related? (2013)
61–70 of 145 posts
Re: How are zlib, gzip and Zip related? (2013)
#62But can he invert a binary tree and is he willing to relocate to San Francisco?
Re: How are zlib, gzip and Zip related? (2013)
#63One important difference in practice is that zip files needs to be saved to disk to be extracted. gzip files on the other hand can be stream unzipped i.e curl http://example.com/foo.tar.gz | tar zxvf - is possible but not with zip files. I am not sure if this is a limitation of the unzip tool. I would love to know if there is a work around to this.
You can't do that with a .zip file because the file header information is actually at the end of the file. You could work around that by sending the header first, though.
Re: How are zlib, gzip and Zip related? (2013)
#64In other compression news, Apple open sourced their implementation of lzfse yesterday: https://github.com/lzfse/lzfse . It's based on a relatively new type of coding - asymmetric numeral systems. Huffman coding is only optimal if you consider one bit as the smallest unit of information. ANS (and more broadly, arithmetic coding) allows for fractional bits and gets closer to the Shannon limit. It's also simpler to impl…
Also, to clarify, ANS is relatively new (2009) but arithmetic coding has been around for a long time. Historically it was avoided because of patents, many (all?) of which have now expired. Apparently ANS isn't going to be patented.
Re: How are zlib, gzip and Zip related? (2013)
#65Not only is this a great read, but the follow up for citations is replied with "I am the reference". If this were reddit I'd post the hot fire gif. Eh, here it's anyway: http://i.imgur.com/VQLGJOL.gif
Neat how involved he still is this long after the initial work. When brotli came out he implemented his own decoder ( https://github.com/madler/brotli/ ) to check the spec, and got some things clarified in RFC. Brotli is pretty DEFLATE-y in spirit, with changes that take advantage of today's hardware (larger history window, contexts in the entropy encoding) and a bunch of tweaks (different match encoding, static dict…
Re: How are zlib, gzip and Zip related? (2013)
#66In other compression news, Apple open sourced their implementation of lzfse yesterday: https://github.com/lzfse/lzfse . It's based on a relatively new type of coding - asymmetric numeral systems. Huffman coding is only optimal if you consider one bit as the smallest unit of information. ANS (and more broadly, arithmetic coding) allows for fractional bits and gets closer to the Shannon limit. It's also simpler to impl…
Strange that Apple didn't publish it on https://github.com/apple (which holds all of their open Swift repos). Also, to clarify, ANS is relatively new (2009) but arithmetic coding has been around for a long time. Historically it was avoided because of patents, many (all?) of which have now expired. Apparently ANS isn't going to be patented.
Re: How are zlib, gzip and Zip related? (2013)
#67Earlier quoted context omitted.
>> Just read the old header, append new files, append new header. This was important back in floppy disk days Don't forget 'overwrite old header' Important for floppy disks in two ways, one because of space constraints and two, because of how slow floppies were.
Don't forget 'overwrite old header' Why? The new one will become the 'real' one since it will be at the end of the modified file. So it doesn't really matter if you delete the old one. If you're really trying to squeeze file sizes down, you could reference the old 'header' from the new one, so that you do not have to list the entire archive's contents again.
This fact has been used to construct pathological ZIP files where one tool will report one list of files and another tool will list a different set of files. That's why you really need to overwrite the old header.
Re: How are zlib, gzip and Zip related? (2013)
#68But can he invert a binary tree and is he willing to relocate to San Francisco?
What does "invert a binary tree" mean?
Re: How are zlib, gzip and Zip related? (2013)
#69It's annoyingly common how the OP doesn't mark this answer as accepted, or even acknowledge how amazing this answer is from one of the technology's creators -- instead just goes on to ask a followup.
The accepted answer is often wrong (or obsolete) and grants a small number of points. The obsession with it on SO is a bit odd.
But then again: the most upvoted answer doesn't mean that it is the most correct (whatever it means) one. Though likely it is.
Re: How are zlib, gzip and Zip related? (2013)
#70But can he invert a binary tree and is he willing to relocate to San Francisco?
What does "invert a binary tree" mean?