Live data from Hacker News

How are zlib, gzip and Zip related? (2013)

stackoverflow.com

81–90 of 145 posts

Re: How are zlib, gzip and Zip related? (2013)

#81
post #70

Earlier quoted context omitted.

What does "invert a binary tree" mean?

Other people have explained the reference, but as for what it means: AFAIK it basically means to produce a binary tree with the same values but with parent-child relationships reversed.

So, each child will have two parents? And there will be several roots? This doesn't make sense.

Re: How are zlib, gzip and Zip related? (2013)

#82
post #68

Earlier quoted context omitted.

What does "invert a binary tree" mean?

It's a reference to https://twitter.com/mxcl/status/608682016205344768

I know the reference and I saw the discussion around it when it came out. I still don't understand what "invert a binary tree" means.

Re: How are zlib, gzip and Zip related? (2013)

#83

Earlier quoted context omitted.

If I recall correctly and it's been a while: The initial header is x bytes from the beginning of the file, or that you have to search for a known key string PKsomething. Then you have to go back and forth between that and the compressed data as you decompress. When compressing files you have to go back to the beginning of the zip file ( or disk1 in a multi disk archive) and update that table with the CRC info. Just w…

That can't be the case anymore because I implemented a streaming function a few years back that sends an unlimited number of files as a zip, but builds the zip on the fly streaming it to the client. Maybe it works because I am not using compression (files in my case are all JPG and/or compressed video so there is little benefit). But my process definitely starts streaming the zip right away and has to pull URLs on th…

This cannot be a 'true' zip file. The central directory is at the end of the zip file. It's made up of information that is needed for the decompression. So if you are streaming it, you cannot decompress until the entire file is reassembled.

Re: How are zlib, gzip and Zip related? (2013)

#84
post #60

Earlier quoted context omitted.

Reminds me of the time I took my friend to play D&D up in Lake Geneva with the Gygax family whom I had been gaming with for a bit. He ended up getting into an argument with Gary about why dwarven women would have beards (of all things). I remember having to kick him under the table and quickly whisper "This is Gary Gygax, he made the game. If he says they have beards they have beards!"

I'd imagine the simplest answer would be "because Tolkien said so".

Citation?

The Jackson films don't count.

Re: How are zlib, gzip and Zip related? (2013)

#85
post #42

Wow a stackoverflow question that hasn't been closed or removed for some trivial reason--thought I'd never see something like that again.

You think stackoverflow has too many good questions being closed? If anything I think more could be closed.

Typically when an interesting stackoverflow thread is linked on HN, it's closed. I don't know why this is. But it gives a very bad impression of the site's moderators.

Re: How are zlib, gzip and Zip related? (2013)

#86
post #42

Wow a stackoverflow question that hasn't been closed or removed for some trivial reason--thought I'd never see something like that again.

I feel Stack Overflow mods have to a least some degree a different purpose in the site than the average user. Far too many times, I find that the answers judged bad by mods or close-voted are the ones that ended up helping me. Isn't that the point?

Re: How are zlib, gzip and Zip related? (2013)

#87
post #60

Earlier quoted context omitted.

I'd imagine the simplest answer would be "because Tolkien said so".

Citation? The Jackson films don't count.

http://tolkien.cro.net/dwarves/women.html has some references. Some of this is also apparently expanded on in the various things Christopher Tolkien has published.

Re: How are zlib, gzip and Zip related? (2013)

#88
post #68

Earlier quoted context omitted.

What does "invert a binary tree" mean?

It's a reference to https://twitter.com/mxcl/status/608682016205344768

Tho honestly homebrew is nothing more than a popular but sub-par solution to a wide-spread problem (my impression from the literature, I never used it), so having it written does not qualify him as a good dev. I'd certainly interview him and test somehow, tho I don't value algorithmic knowledge all that much, especially in the web dev sector.

Re: How are zlib, gzip and Zip related? (2013)

#89
I love the discussion in the comments:

> This post is packed with so much history and information that I feel like some citations need be added incase people try to reference this post as an information source. Though if this information is reflected somewhere with citations like Wikipedia, a link to such similar cited work would be appreciated. - ThorSummoner

> I am the reference, having been part of all of that. This post could be cited in Wikipedia as an original source. – Mark Adler

Re: How are zlib, gzip and Zip related? (2013)

#90
post #3

It'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.

Out of curiosity, why do you care whether the answer is marked as accepted?
Post reply on HN