Google

Trf commands: zip


[ UpMisc commands | Sitemap ]      


Options understood by ``zip''are:

-mode

Allowed arguments are ``compress'', ``decompress'' and all unique abbreviations of these.

For immediate usage it specifies the operation to use.

For attached transformations it specifies the operation to use for writing. Reading will automatically use the reverse operation.

-level

Possible arguments are ``default'' and integer numbers in the range 1 ... 9. It specifies the used compression level.

-nowrap

Possible arguments are ``default'' and everything accepted by Tcl_GetBoolean(FromObj).

Normally the compressed stream is "wrapped" between 2 header-bytes (id) and 4 footer-bytes (crc). When using -nowrap, those bytes are stripped off the stream. They are only used for error-checking and not for the actual compression/decompression. Because the ZIP file format has its own error-checking already, there is no need to duplicate it in the stream.

Thus using '-nowrap 1' allows a much simpler processing of ZIP files.


This transformation uses the freely available zlib compression library to accomplish its task. It uses the unpatented ``deflate''-algorithm employed by gzip, pkzip and others. The current version is 1.1.3, but trf will work with any version from 1.0.4 and upward.

The official homepage can be found at http://www.info-zip.org/pub/infozip/zlib/. A downloading page is available there too. Additional sources of information are rfc1950.txt, rfc1951.txt and rfc1952.txt.

trf requires a shared library version of zlib. People without such don't loose however.

  • The unix-specific makefile contains the target ``zlib''. This will generate a shared library for zlib. It assumes that the zlib source distribution is available as subdirectory zlib (a sibling to unix !).
  • A binary distribution for Windows® is available too, just take a look at http://www.winimage.com/zLibDll. A note of caution: The provided library kept crashing on my Windows NT® system. At least often enough to render it unusable in my eyes. YMMV however. Because of this the subdirectory zlib.vc contains everything to compile zlib as shared library (with MSVC++ 4.2). Just copy its contents into a zlib source distribution, copy makefile.vc to makefile, adapt the paths to your directory structure, then type nmake in a dos box. At last copy the newly generated zlib.dll into the system directory of your machine.
  • I have no information about its availability on MacIntoshes.

Remark: The current version of zlib (1.1.3) uses configure from GNU autoconf to configure itself for a variety of unix systems. This includes generation of a shared library too and makes compilation of this library much easier.


© Andreas Kupries

Last update at Mon Aug 20 22:52:27 PDT 2001