[Qt-interest] Reading/Writing archives
Stephen Bryant
steve at bawue.de
Tue Mar 16 00:16:31 CET 2010
Hi,
> >From what I read, zlib works only for single-file archives.
>
> With gzip or zip libraries, I may have missed something, but it seemed
> to me that it cannot navigate in the archive file without uncompressing
> it on the disk first.
While 'gzip' and 'zip' have very similar names and use the same zlib
compression routines, the file formats are not at all similar.
A gzip file is not an archive - it is a single compressed file. The
compressed data may contain an archive, but you will have to decompress it
first to get at it.
A zip file, conversely, is an archive with an index at the end. You do not
need to decompress it to read the index. The index also contains the offsets
is individual compressed files inside the archive, allowing them to be
accessed directly.
I would think that ZIP should suit you just fine. Make sure your
implementation also support the ZIP64 extensions, otherwise you are likely to
run into the 4GB file size limit.
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100316/3e3ad5af/attachment.bin
More information about the Qt-interest-old
mailing list