[BusyBox] gunzip patch

Glenn McGrath bug1 at optushome.com.au
Wed Aug 7 07:23:03 UTC 2002


I have a patch for the unzip code, it uses low level file descriptors
instead of streams, it also add a buffer which speeds it up significantly,
and doesnt changes the size of the binary (i only had gunzip selected
though).

It touches lots of applets, tar, unzip, gunzip, rpm2cpio, dpkg-deb so ill
do some more testing before i commit. (ive only done light testing so far)

Upstream doesnt use streams, i changed it a fair while back... seemed like
a good idea at the time, however lately ive been working on redoing the
common unarchiving code to make it more generic, im hoping this more
generic code will save space due to reduced conditional code and paramater
parsing.

The unarchiving code im working on is smaller, but im having problems
cleaning up streams after use, ftell() states the wrong position judging
by the data im reading, if i fflush it only fixes it partly.

I think that as tar -z sends data via a low level file descriptors
(fork/pipe) it would be better for unzip to also use file
descriptors.

http://people.debian.org/~bug1/gunzip.diff or
http://people.debian.org/~bug1/gunzip.diff.gz

It is a work in progress


Glenn



More information about the busybox mailing list