Skip to content

Comment on Show HN: Gzip decompressor in ~300 lines of readable Python

Comments

The code looks clean and it works. It's fun to implement your own understandable parser. After doing such an exercise, suddenly a seemingly complex file format doesn't look like such a black box anymore. When I implemented my decompressor, I also looked at https://github.com/pfalcon/pyflate , to understand and verify the inner gzip/deflate RFC workings. Pyflate is also pretty small, especially after removing the bzip2 code, after which only ~450 lines are left. Laiho's code seems more readable, though.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.