gzip lies #23
Replies: 3 comments
-
|
And of course to outline quirks, weirdness and other stuff we encounter along the way. .tar has already proven complicated enough for its own lies discussion later, actually. |
Beta Was this translation helpful? Give feedback.
-
|
I've been trying to read through RFC 1951 as to how the deflate compression method uses Huffman coding to compress the data blocks. Here's an example on page 7: This produces the following Huffman codes for each symbol following the path each branch to the symbol of the binary tree: Specifically within a deflate data block, the Huffman algorithm follows two rules:
The RFC then goes on to say that, applying these rules, they can recode that example to the following Huffman codes: I guess I'm failing to see how the first example breaks the two rules? The alphabetical order in the example is, I assume, ABCD for symbols A, B, C, and D. In the first example, C and D have Huffman code lengths of 3 and are presented in order. The shorter code for B is after the longer code for A. Any thoughts? |
Beta Was this translation helpful? Give feedback.
-
|
I came across two videos while looking for info on Huffman encoding and these two videos helped greatly: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Topics of Discussion
In the interest of contributers, this discussion is for discussing everything relating to parsing / extracting the gzip format. Anything relating to the parsing of the gzip format and / or handling deflate data streams can be discussed here. Including strategies to handle Huffman tables / compression along with LZ 77 compression both used in the deflate algorithm.
Beta Was this translation helpful? Give feedback.
All reactions