6 ms·
> 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
by stgn 6mo ago
> 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/puff.c https://github.com/madler/zlib/blob/develop/contrib/puff/puf...
- dymk 6mo agoThis 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.
- f1shy 6mo ago> It makes me wonder if there was some LLM help I would bet there was
- fuhsnn 6mo ago> 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.
- bitbasher 6mo agoYou could say it was a “puff” piece, eh, eh!?
- cmovq 6mo agoEven the function names are identical :/
- Rexxar 6mo agoThe difference in size seems to be mainly due to the missing documentation before each function.
- ieviev 6mo agoOh i didnt even know of this. But i got a lot of help from this one https://github.com/madler/infgen https://github.com/madler/infgen EDIT: Didnt notice that it’s even by the same person of course it’s very similar
- pseudohadamard 6mo agoMeh, I've written a gzip decompressor in two lines of shell script: #!/bin/sh gzip -d $@