On Mon, 06 May 2002 08:47:07 -0500
Idahosa I O Edokpayi <ida...@sw...> wrote:
> I am trying to compress and decompress files for a small game project
> (I need to stay under 5 mb) using the crypto library. Crypto, or
> rather the gzip library in crypto, doesn't handle multiple files in
> one zip file in an obvious way. You specify a source and a target and
> that's it apparently. Does anyone know enough about gzip to suggest a
> better way?
You're used to things like zip files which individually compress each
file and then pack the resultant compressed files together in a single
larger file. gzip doesn't work that way, basically due to the fact that
it is a stream compressor and not a file compressor (which also means
that it doesn't support the meta-data overhead that file compressors
require). Instead the metaphor is that all the files are first
collected into a single archive file, and then the entire thing is
compressed.
Or, more simply, you hand it a stream and it hands you a compressed
stream in reply. Any relevance to files is an abstraction outside of
gzip.
--
J C Lawrence
---------(*) Satan, oscillate my metallic sonatas.
cl...@ka... He lived as a devil, eh?
http://www.kanga.nu/~claw/ Evil is a name of a foeman, as I live.
|