Expand description
This crate provides a Rust implementation of the Zstandard Seekable Format, as outlined in the specification.
The seekable format splits compressed data into a series of independent “frames”, each compressed individually, so that decompression of a section in the middle of a compressed file only requires zstd to decompress at most a frame’s worth of extra data, instead of the entire file.
The frames are appended, so that the decompression of the entire payload still regenerates the original content, using any compliant zstd decoder.
Zeekstd uses bindings from the zstd_safe crate.
§Getting Started
- The
RawEncoderandEncodercompress data. - The
Decoderperforms seekable decompression. - The
SeekTableholds information of the frames of a seekable comressed file, it gets created and updated automatically during compression.
Re-exports§
pub use seek_table::SeekTable;
Modules§
Structs§
- Bytes
Wrapper - A seekable wrapper around a byte slice.
- Compression
Progress - The progress of a compression step.
- Decode
Options - Options that configure how data is decompressed.
- Decoder
- Decompresses data from a seekable source.
- Encode
Options - Options that configure how data is compressed.
- Encoder
std - A single-use seekable encoder.
- Epilogue
Progress - The progress of writing the frame epilogue.
- Error
- The errors that may occur when working with this crate.
- RawEncoder
- A reusable, seekable encoder.
Enums§
- Frame
Size Policy - A policy that controls when new frames are started automatically.
- Offset
From - Enumeration of possible methods to set the offset within a
Seekableobject.
Constants§
- SEEKABLE_
MAGIC_ NUMBER - The magic number of the seek table integrity field.
- SEEKABLE_
MAX_ FRAMES - The maximum number of frames in a seekable compressed file.
- SEEKABLE_
MAX_ FRAME_ SIZE - The maximum size of the uncompressed data of a frame.
- SEEK_
TABLE_ INTEGRITY_ SIZE - The size of the seek table integrity field.
Traits§
- Seekable
- Represents a seekable source.
Type Aliases§
- Compression
Level - Represents the compression level used by zstd.
- Result
- A
Resultalias where theErrcase iszeekstd::Error.