[BusyBox] Re: [patch] Making micro-bunzip play nice with tar...

Glenn McGrath bug1 at optushome.com.au
Thu Oct 16 04:47:35 UTC 2003

On Wed, 15 Oct 2003 23:07:21 -0500
Rob Landley <rob at landley.net> wrote:

> Glenn: is this what you wanted for tar?

Almost, i really want the interface

extern ssize_t read_bz2(int fd, void *buf, size_t count)

Then i can point to it with a function pointer inside the common
unarchiving code.

typedef struct archive_handle_s {
	ssize_t (*read)(int fd, void *buf, size_t count);

The arguments are that way so its compatable with libc's
ssize_t read(int fd, void *buf, size_t count);
ssize_t read_gz(int fd, void *buf, size_t count)
from libunarchive/unzip.c's

Being able to read uncompressed, gzip compressed or bzip compressed data
interchangably is very convenient.

You seem to have all the bits there, i just need a litle wrapper around
your functions. 

Im working on something else at the moment, but i can have a go at
hooking this up in the next couple of days if you want to move on.


More information about the busybox mailing list