> so i wrote a gzip decompressor from scratch
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...
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...
It makes me wonder if there was some LLM help, based on how similar the fn structure and identifier names are.
I would bet there was
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.
https://github.com/madler/infgen
EDIT: Didnt notice that it’s even by the same person of course it’s very similar
#!/bin/sh
gzip -d $@