Crate zeekstd

Crate zeekstd 

Source
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 an archive only requires zstd to decompress at most a frame’s worth of extra data, instead of the entire archive.

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 RawEncoder and Encoder compress data into seekable archives.
  • The Decoder performs seekable decompression.
  • The SeekTable holds information of the frames of a seekable archive, it gets created and updated automatically during compression.

Re-exports§

pub use seek_table::SeekTable;

Modules§

seek_table

Structs§

BytesWrapper
A seekable wrapper around a byte slice.
CompressionProgress
The progress of a compression step.
DecodeOptions
Options that configure how data is decompressed.
Decoder
Decompresses data from a seekable source.
EncodeOptions
Options that configure how data is compressed.
Encoderstd
A single-use seekable encoder.
EpilogueProgress
The progress of writing the frame epilogue.
Error
The errors that may occur when working with this crate.
RawEncoder
A reusable, seekable encoder.

Enums§

FrameSizePolicy
A policy that controls when new frames are started automatically.
OffsetFrom
Enumeration of possible methods to set the offset within a Seekable object.

Constants§

SEEKABLE_MAGIC_NUMBER
The magic number of the seek table integrity field.
SEEKABLE_MAX_FRAMES
The maximum number of frames in a seekable archive.
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§

CompressionLevel
Represents the compression level used by zstd.
Result
A Result alias where the Err case is zeekstd::Error.