[BusyBox] [patch] micro-bunzip version 3. :)

Rob Landley rob at landley.net
Thu Oct 16 05:41:47 UTC 2003


The API for using partial writes, as described in my last message, sucked.

So here's a patch against my last patch that changes things so that 
write_bunzip_data calls read_bunzip_data itself behind the scenes whenever 
necessary.  So usage is now just start_bunzip(), write_bunzip_data() until it 
returns a negative number, and then the cleanup at the end of 
uncompressStream.

It adds 32 bytes to the executable, but it should allow the caller (tar) to be 
simplified enough to compensate.  Total -Os stripped exe size now 6856 bytes.

Rob

P.S.  I attached the whole C file so you don't have to keep incremental 
patches straight if you don't want to. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bunzip-3.patch
Type: text/x-diff
Size: 5382 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20031016/41183c10/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bunzip-3.c
Type: text/x-csrc
Size: 17833 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20031016/41183c10/attachment.c 


More information about the busybox mailing list