[BusyBox] read_gz patch
Laurence Anderson
l.d.anderson at warwick.ac.uk
Sat Nov 16 18:09:39 UTC 2002
When I was adapting my rpm applet and had to fork to uncompress the cpio
archive, which I based on get_header_tar_gz I noticed that for bzip2 archives
you didn't have to, due to the read_bz2 method. Just out of interest I wrote
a similar thing for gzip too, so there is no need to fork on unzipping
archives. However there's a catch - its slower as it copies the data twice
(but then a pipe does that) and i've seen it use about 400k memory on highly
compressed files (like the kernel source).
Anyway, its at
http://www.warwick.ac.uk/~esvld/programming/patches/busybox/busybox-read_gz.diff
I dunno what people think, is it useful? The main thing it that it removes the
need to fork.
Laurence
More information about the busybox
mailing list