Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

File compression works on the basic idea of assigning commonly recurring chains of strings to a common index of a table where the full string is stored.

For example:

Input file: foo bar bash baz foo foo bash foo baz baz foo baz foo bar
Output file: foo ,bar ,bash ,baz |01230020330301

I understand that this is a trivial example and actual file structures and algorithms are much more complex, but my question is, are there any existing compression utilities that provide options for viewing this sort meta-data in some way given a specific archive? Possibly for educational purposes?

share|improve this question
I'm not sure this is always possible. From what I understand, in a file compressed using an adaptive Huffman coding, the “metadata” depends on the data itself, and the table you describe actually evolves during the extraction of the file. – Vincent Nivoliers Nov 14 '12 at 23:00
I wonder if possibly there is a compression utility that uses a simpler algorithm useable for education purposes. – Cory Klein Nov 14 '12 at 23:05
@CoryKlein Grab sources of some compression utility (gzip, xz...), add debug code, that will print the dictionary and run it on a simple file you prepare. That's one of the original reasons behind GPL - being able to study and modify the code that is running on your system. :) – peterph Nov 15 '12 at 10:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.