This feels like it should have been mentioned in the article.
It makes me wonder if there was some LLM help, based on how similar the fn structure and identifier names are.
> It makes me wonder if there was some LLM help
I would bet there was
> This feels like it should have been mentioned in the article.
With an entire section complaining how many lines of code existing implementations are, looks like they did found a good simple implementation to clone in Rust then deliberately not mention it.
Re:Gzip decompression in 250 lines of Rust
by bitbasher on Friday March 27, 2026 @02:36PM
(#47546548)
You could say it was a “puff” piece, eh, eh!?
Even the function names are identical :/
The difference in size seems to be mainly due to the missing documentation before each function.
Oh i didnt even know of this. But i got a lot of help from this one
https://github.com/madler/infgen
EDIT: Didnt notice that it’s even by the same person of course it’s very similar
Re:Gzip decompression in 250 lines of Rust
by pseudohadamard on Saturday March 28, 2026 @10:53AM
(#47555133)
Meh, I've written a gzip decompressor in two lines of shell script:
#!/bin/sh
gzip -d $@
After skimming through the author's Rust code, it appears to be a fairly straightforward port of puff.c (included in the zlib source): https://github.com/madler/zlib/blob/develop/contrib/puff/puf...