Does anyone know of a free (open-source would be nice) compression/archive format that would allow me to decompress from memory rather than just from disk? I need to be able to decompress small pieces of the archive at a time. It seems that zlib requires the entire archive to be in memory at once, not just a piece of it; bzip2 is like gzip in that it only compresses one file; RAR and ACE have free decompression libraries but don't support decompressing from memory, only from disk.
This is for a network-based program in which the client downloads a rather large (1000 MB uncompressed, 400 MB when supercompressed with WinRAR) directory structure from a server in small chunks, decompressing one while downloading the next. I need a format that will allow the program to do just that.
Need Compression Format
- Wolf on Air
- DBB Admiral
- Posts: 1872
- Joined: Mon Dec 13, 1999 3:01 am
- Location: Stockholm, Sweden
- Contact:
Actually, every one you listed should be decompressable in parts, and from memory... investigate the APIs more. Oh, and ZLib is almost the same thing as GZip, you need to couple either with an archive format of some kind to store multiple files. Either make up your own (filename+length should suffice, perhaps keep the table at the beginning of the file instead) or use something simple and standard like TAR, which should let you unpack-as-you-go easily.
You might also take a peek at www.7-zip.org - free opensource archiving system. I haven't played too much with it, but it shows promise... especially check out http://www.7-zip.org/sdk.html
You might also take a peek at www.7-zip.org - free opensource archiving system. I haven't played too much with it, but it shows promise... especially check out http://www.7-zip.org/sdk.html