Expand description
This is a library for creating and consuming specially crafted .tar.gz files with the following properties:
-
Efficient access to specific predefined points in the tar (“chapter boundaries”). A chapter consists of zero or more consecutive tar entries. This can be used to skip over groups of tar entries in O(1) time without performing the work of gzip decompression on the intervening entries.
-
Parallel decompression: different chapters of the same tgz can be read simultaneously by different threads. Extracting a later entry is not stalled on processing all previous entries as in a conventional tgz file.
-
Perfectly compatible with existing readers that do not know about chapter information. All existing software will be able to read these files as ordinary tgz files. Chapter information is encoded in the form of valid empty gzip blocks with peculiar Huffman code alphabets.
-
Perfectly compatible with existing writers that do not embed chapter information. Tgz files without chapter information are handled as if there was a single chapter encompassing all of their entries.
Refer to example code on TgzReader that demonstrates leveraging chapter
information to skip over entries or process chapters on a thread pool.
Re-exports§
pub extern crate tar;
Re-exports§
pub use flate2::Compression;
Modules§
- io
- std::io impls
Structs§
- TgzReader
- Decompressor for reading .tar.gz files containing embedded chapter information.
- TgzWriter
- Compressor for producing .tar.gz files with embedded chapter information.
Traits§
- Independent
Read - Trait bound enabling
TgzReader::independent_read_chapter.