[sword-devel] Zipfile module downloads

Sebastien Koechlin seb.sword at koocotte.org
Fri Sep 21 09:44:06 MST 2007

Can I also try to clarify?

	- Zip is an archive file format. It store compressed files. Archive
	start with 'PK' and end with a directory of included files. You can
	easily get a list of included files by reading the end of the file.

	- zlib is a compression library; it can compress bytes streams or
	individual files.

	- tar is an archive file format. It store uncompressed files. Build
	for sequential tape access, there is no directory, you find file
	names before file data.

	- tar.gz or tgz are tar archives files compressed using zlib. To get
	a list of content, you have to uncompress the whole file using zlib;
	and to read the whole stream to find files.

If sword is using zlib to compress and uncompress data, CompressType should
not be ZIP, but deflate (or gzip?).

To manipulate thoses file, you do not have to rewrite existing code.
Libraries exists:

	- libtar to read tar files: http://www.feep.net/libtar/ designed
	to be plugged on zlib to handle tar.gz files (but slow as you have
	to read the full uncompressed file).
	- zziplib to read zip files: http://zziplib.sourceforge.net

Sebastien Koechlin

More information about the sword-devel mailing list