Compress

Component Overview

Compress is an API for working with tar, zip and bzip2 files.

Quick Start

*compress* is divided between Compressors and Archivers. While you have to get an Archiver from a factory when just archiving one or more files to the target file (tar), you'll need a Compressor for reducing the files size (bzip2).

Please note: There are discussion of "sponsoring" compress with code from TrueZip ([WWW] https://truezip.dev.java.net/) and of enhancing compress design. At the moment the current implementation is considered as complex by some people. An deeper look at compress implementation can be found on the CompressImplementationDetails page.

Archiver

To pack an archive, you have to get an archiver via the ArchiverFactory. At the moment it's possible to get a "zip" or a "tar" archiver. Add your files to the archiver and call save to store the archive.

Packing a ZIP-File

Unpacking a ZIP-File

Compressor

Same goes for Compressor. At the moment there is only "bz2" support.

Compressing a file

Decompressing a file

FAQ

TODO

- Add delete features - Enhance implementation design

last edited 2007-10-05 11:11:14 by ChristianGrobmeier