[Toybox] gunzip.c cleanup

Rob Landley rob at landley.net
Sun Jan 21 12:29:32 PST 2018


On 01/19/2018 10:06 PM, Rob Landley wrote:
> Sorry for the delay answering, my burst of free time ran out and I had
> to pack up and and drive cross-country for work. I'll try to get this
> fixed (and passing all the tests) by monday.

Ok, I did one more round of obfuscation that merged the do_gzip and
do_gunzip codepaths, inlined the gzerror() wrapper, and removed 30 lines
of code. It passes all the tests now.

One of the big reasons the tests were failing (for me) is the
if (CFG_TOYBOX_LIBZ) symbol isn't in defconfig, so when i did a
"make defconfig test_gzip" all the output files were zero length because
I havn't implemented the else case yet. So I commented that test out,
and that means i can't promote it quite yet.

I still have two largeish todo items for this file: 1) using the deflate
code from pending/compress.c, 2) fixing the "zcat README" thing to
notice it's not a gzip file.

Rob

P.S. That's not counting 3) finish the deflate compression-side code.



More information about the Toybox mailing list