About

This module provides the file system driver map modifier class net.java.truevfs.driver.zip.ZipDriverMapModifier which provides the following file system driver mappings:

URI Schemes / Archive File Extensions File System Driver Class
zip net.java.truevfs.comp.zipdriver.ZipDriver

Add the JAR artifact of this module to the run time class path to make its file system drivers available for service location in the client API module. The URI schemes will then get recognized as default archive file extensions by the class net.java.truevfs.access.TArchiveDetector.

Key Features

Appending To Existing ZIP Files
New ZIP entries can get appended to existing JAR files.

To use this feature with the client API, set FsAccessOption.GROW, e.g. in TConfig.setAccessPreferences(BitField).

Recovery Of Lost ZIP Entries
When reading truncated ZIP files, lost entries can get recovered.

To use this feature with the client API, you don't need to do anything. This happens automatically if you use any of the file system drivers for reading JAR files.

WinZip AES Specification
When reading or writing a ZIP file, ZIP entry data can get encrypted and authenticated according to the WinZip AES specification.

To use this feature with the client API, set FsAccessOption.ENCRYPT, e.g. in TConfig.setAccessPreferences(BitField), or install a custom file system driver which sets this option before calling its super-class implementation in ZipDriver.newEntry(String, Entry.Type, Entry, BitField). In either case, if you don't want to use the built-in KeyManagerZipCryptoParameters for prompting the user for a password using a Swing GUI or the console, then you should override ZipDriver.zipCryptoParameters(FsModel, Charset) in order to provide custom net.java.truevfs.driver.zip.core.io.WinZipAesParameters, too.

Note that the WinZip AES encryption scheme does not encrypt and not authenticate any ZIP entry meta data, i.e. neither the ZIP entry comments, the ZIP entry names nor the central directory. If you want this, then please consider using the ZIP.RAES file format instead.

BZIP2 Compression
When reading or writing a ZIP file, ZIP entry data can get decompressed or compressed using the BZIP2 algorithm. To use this feature when reading a BZIP compressed ZIP entry, you don't need to do anything - decompression happens automatically.

To use this feature for writing a BZIP2 compressed ZIP entry with the client API, install a custom file system driver which overrides ZipDriver.getMethod().

Selectable Character Sets
The character set for reading and writing ZIP comments and ZIP entry names can get set when using a file system driver or the ZIP classes directly.

To use this feature with the client API, install a custom file system driver which overrides ZipDriver.getCharset().

ZIP64 Extensions
ZIP64 extensions are automatically and transparently activated when reading or writing ZIP files of more than 4 GB size.