On Friday 20 June 2008 17:05, Bernhard Fischer wrote: > On Fri, Jun 20, 2008 at 04:58:04PM +0200, Denys Vlasenko wrote: > > >We already have open_transformer(), so you just call > > > >fd = open_transformer(gzfile_fd, unpack_gz_stream, "gunzip"); > > > >and voila - you can gunzip file on the fly :) > > Can we have a libunarchival wrapper that sets up open_transformer for > us, depending on supported decompressors and file-extension (see > depmod.c for the FIXME) ? > > tar already has such a thing, ISTR.. perhaps generalize that
tar looks at first few bytes, not at the extension. If only kernel had ungetc for fd-based io... I think it is somewhat unfair to ask Vlad to do this, we can add it incrementally later. -- vda _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
