help-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Gunzip and bunzip2 stores


From: Ludovic Courtès
Subject: Gunzip and bunzip2 stores
Date: Fri, 6 Sep 2002 14:28:12 +0200

Hi,

As I was working on a read-write version of tarfs, still based on libstore to
handle zipped files, I noticed two main problems with using the gunzip/bunzip2
stores. The first one is that both of them are read-only (of course, that's an
issue ;) and both of them consume quite a lot of memory since they use a
buffer store to store the whole file (BTW store_write () on a zip store
returns zero where we'd rather expect EROFS or so).

Beside these problems is another one: There is not "store_set_size" function
to set the size of the underlying storage (like what we do with file_set_size
()). Therefore, it is impossible to truncate a file which is needed when
writing a tar file that is smaller than the original one.  I tried to change
the "length" field in the store's store_run (a file store) before calling
store_close_source () but this is just ignored.

Should I rather switch to a custom store-like io library (using libbz2 and
zlib) or is there another solution with libstore?

Thanks!
Ludovic.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]