Repository navigation
v0.2.8
-
Framed containers (
framedfeature).mzstd::framingports
mbrotli's structured framing API one to one —FramedCompressorwith
borrowed one-shot input, native and owned sessions, resource guards,
FramedWriter/ResourceWriterandFramedEncoderReader;
FramedDecompressorwith owned, appended and sliced one-shot output,
event sessions,FramedReaderand the random-accessFramedSeekReader;
resources, metadata (resource, footer, global, repeated), padding,
hidden resources, explicit dictionary references, a central directory and
a footer. In place of RFC 9841's Brotli wire format the container is made
only of Zstandard frames: visible resource chunks are regular frames,
byte-identical toZSTD_compress2of each chunk, sozstd -dprints the
visible resources; headers, metadata, hidden resources and the directory
live in skippable frames; and the container ends with a seek table in
zstd'scontrib/seekable_formatlayout. Tests check every container
againstZSTD_decompressand the contrib seekable decoder, which
zstd-ffinow builds as an oracle (along with the contrib seekable
compressor, the benchmarks' baseline). The fuzz package's opt-in
experimentalfeature is replaced byframed, which gates the
framed_encode,framed_decodeandframed_roundtriptargets. The
format is specified inarchitecture/framing.md; the API may change in
patch releases while the feature is opt-in. -
Clarified
ParallelTaskQueuedocumentation. Stopped executors can
leavewait, the blocking reader and writer and the writer's finishing
waiting indefinitely; dropping queue handles or tasks reports closure or
abandonment when the session observes it. Tasks executors already hold
must still be run or dropped. -
Parallel batches over random-access sources.
ParallelCompressor::prepare_sourceplans a batch over a
RandomAccessSourceinstead of a borrowed slice, as mbrotli's does, and
returns anOwnedParallelBatchwhose tasks are'static, so they run on
detached threads or any executor. Each task reads its segments and their
overlap into one reused buffer; the frame is byte-identical to
prepare_sliceover the same bytes.ArcBytesSource(sharedArc<[u8]>),
SeekSource(anyRead + Seek + Sendreader behind a mutex) and
FileSource(positional reads of a regular file) implement the trait,
andSourceIdentitylets a source carry a version token.finishchecks
that the source's length and identity are unchanged
(ParallelEncodeError::SourceChanged) and, for a frame with a checksum,
reads the source once more to hash it. Source failures are
SourceMetadataandSourceRead { segment }, carrying theio::Error
in aSourceIoErrorso the error staysClone + Eq.