Repository navigation
rapidgzip-rust v0.2.0
Upgrade notes
DecodeReportremainsCopy, but now includes the mandatory concrete
format: Formatfield and optionalline_count: Option<u64>field. Code
constructing reports or destructuring them without..must account for
both additions. Existing gzip decoding defaults and verification semantics
are unchanged.- The new random-access API uses the format-neutral
DeflateIndexand returns
an owningIndexedDecodeReportonly from operations that explicitly request
index construction. Ordinary decode operations continue to return the small
CopyDecodeReport.
Fixed
- Parallel task queues now publish their availability counters before making
work visible, preventing a worker from consuming a task before the matching
counter increment. - CLI index import now streams through the core allocation limits, requires an
exact format length, and rejects trailing data instead of buffering an
untrusted file or treating arbitrary bytes as an empty GZI. - Index export now serializes transactionally through a same-directory
temporary file, preserving an existing destination after incompatibility or
write failures. Normal decode output treats an early closed pipe as a
successful consumer exit through wrapped decoder errors as well as direct
I/O errors. - Output collision checks now compare the already-open input file with the
destination by file identity on Unix and Windows, preventing hard-link and
symlink aliases from truncating a forced input.
Changed
-
Runtime telemetry now documents the distinction between the effective
active_workersadmission target, approximatebusy_workersdecode
activity, and livespawned_workers. A worker that owns a completed bounded
result may remain live during consumer backpressure until output advances or
the decode is cancelled. -
Programmatic-reader performance work now has an alternating A/B runner over
validated single-member, sparse/dense multi-member, and BGZF FASTQ, including
ordinary, indexed, and actual paraseq consumption. Reports compute paired
candidate/maindeltas before aggregation to reduce host-state bias. -
Structural analysis now uses an inlined bit-buffer fast path and one bounded
linear history/checksum buffer. The default no-output-limit path is
monomorphized separately, avoiding configured-limit and redundant structural
counter checks for each symbol while preserving checked total output. -
The
rapidgzip-rustCLI now exposes rapidgzip-compatible decoding, counting,
index import/export, range extraction, output, format, and reporting options.
Imported indexes drive strict full-stream indexed decoding. Options whose
semantics are not implemented, including disabled verification, sparse
windows, and shared-cursor I/O strategies, are rejected instead of ignored. -
The CLI's format-neutral index default is now native. Payload output can be
combined with byte and line counting in one pass; reports move to stderr when
stdout carries decoded bytes. Imported range extraction documents its
partial-verification boundary, while--verifyperforms a complete strict
pass and otherwise-ignored decoder options are rejected. -
Line-aware index construction annotates the retained checkpoint vector in
place instead of duplicating every point in ordered tree structures. Strict
indexed decoding with line counting enabled now authenticates imported
checkpoint and total line counters. -
Generic gzip, zlib, and raw-DEFLATE path selection now uses a bounded
machine-, runtime-budget-, task-count-, and input-aware admission screen.
It replaces a fixed low-thread marker/window policy, keeps short inputs and
unfavorable workloads on zlib-rs, and preserves specialized BGZF, stored,
and dense-member routing.DecoderPath::MarkerAdmissionexposes the
transient decision through existing telemetry. -
The random-access API uses the format-neutral
DeflateIndexname instead of
GzipIndex. This, the new mandatoryDecodeReport::formatfield, and
multi-format index provenance ship in 0.2.0 rather than a 0.1.x patch.
Added
-
Deterministic, self-verifying release benchmark corpora covering ordinary
single/multi-member gzip, true BGZF, stored DEFLATE, low-compression data,
zlib, and raw DEFLATE. The fair runner uses explicit competitor identities,
decoded SHA-256 preflight, prebuilt indexes, affinity, rotated sample order,
complete failure rows, provenance capture, and strict Rust-generated TSV and
Markdown summaries. Hosted CI validates reproducibility and harness behavior
without imposing a timing threshold. -
Bounded structural analysis through
Decoder::analyze,
Decoder::analyze_with_options, and streaming counterparts. The structured,
deterministic result covers gzip/zlib/raw framing, every DEFLATE block,
dynamic Huffman alphabets, symbol composition, and exact predecessor-window
summaries while retaining only one 32 KiB output history. Concatenated and
empty gzip members and BGZF remain distinct and fully checksum-verified. -
AnalyzeOptionsand typed analysis errors for stream, block, aggregate
optional-header, and detailed-reference budgets, allocation failures, and
checked-counter overflow. Individual references are optional; exact counts,
length histograms, reach, coverage, and deterministic interval unions remain
available when detail is omitted. -
rapidgzip-rust --analyze, including non-seekable input, bounded verbose
reference detail, rapidgzip 0.16.0-compatible presentation, pinned
differential CI, and a generated FASTQ-like analysis benchmark. -
Opt-in newline counting through
DecoderBuilder::count_linesand the new
DecodeReport::line_countscalar, preservingDecodeReport: Copy. Combining
counting with explicit index construction annotates every retained
checkpoint and the index total on final ordered output. Concatenated and
empty gzip members, BGZF, zlib, raw DEFLATE, streaming push/pull, marker
decoding, and strict indexed decoding share the same semantics. -
DeflateIndex::checkpoint_at_or_before_lineand
IndexedReader::seek_to_linefor zero-based line access. gztool version 1
import/export translates its one-based checkpoint numbering and refuses
incomplete line metadata. -
CLI byte and line ranges using rapidgzip's comma-separated
SIZE@OFFSET
syntax, including binary byte units,L,inf, overlaps, and ordered
extraction. The CLI can read and write native, GZIDX, gztool, line-aware
gztool, and BGZF.gziindexes. -
Strict parallel full-stream reuse of caller-supplied
DeflateIndexvalues
throughDecoder::decode_from_indexandDecoder::reader_from_index. Every
span must match its next compressed-bit and decompressed-byte checkpoint;
invalid indexes never fall back. The path supports gzip, concatenated and
empty gzip members, BGZF.gziwithout a known final output size, zlib, and
raw DEFLATE while preserving complete trailer verification, bounded ordered
output, adaptive workers, runtime ceilings,Read + Send, and telemetry via
DecoderPath::IndexedParallel. -
Deterministic interior block checkpoints from one-worker indexed decoding,
making an index built by the authoritative sequential zlib-rs path reusable
for later parallel decoding of single-stream gzip, zlib, and raw DEFLATE. -
Explicit zlib and raw-DEFLATE decoding through every push and pull API, plus
opt-in gzip/zlib auto-detection that never guesses raw input. Large positional
streams share the adaptive rapidgzip marker/window path; non-seekable streams
share the resumable sequential engine. Zlib validates CMF/FLG, enforces CINFO
history limits, and verifies Adler-32, while raw DEFLATE is structurally
validated through its exact final byte. -
Format,DecoderBuilder::format,DecoderBuilder::auto_detect_format, and
concreteDecodeReport::format, withDecodeReportremainingCopy.
DecoderBuilder::expected_uncompressed_sizeadds an exact output contract
for every format and rejects overruns before output handoff. -
Format-aware
DeflateIndexprovenance and checkpoint kinds for gzip, BGZF,
zlib, and raw DEFLATE. The native version-1 format round-trips every kind;
gzip-specific external exporters now reject incompatible indexes. -
Explicit random-access indexing operations for positional and non-seekable
push/pull decoding, returningIndexedDecodeReportwhile preserving the
existingCopyDecodeReportand zero-indexing default path. The new
IndexingDecoderReaderremainsRead + Sendand exposes the same runtime
telemetry and worker controls asDecoderReader. -
A validated
DeflateIndexmodel with explicit member/header/DEFLATE checkpoint
provenance, bounded native and external-format parsing, optional compressed
32 KiB predecessor windows, and import/export for native version 1,
indexed_gzip GZIDX, htslib BGZF.gzi, and gztool formats. -
IndexedReader, aRead + Seekview that checks source-size provenance,
strictly handles truncation and trailing data, fully verifies members entered
at member checkpoints, and documents the checksum limitation when a foreign
index resumes inside a member. -
Decoding of non-seekable compressed input through
Decoder::decode_stream
andDecoder::stream_reader, which accept anystd::io::Readand mirror
Decoder::decodeandDecoder::reader.Decoder::openand the new push
counterpartDecoder::decode_pathnow route a
non-regular path accepted byFile::open, such as a FIFO or character
device, to the streaming decoder instead of failing, and the CLI accepts-
for standard input. Such input runs the sequential zlib-rs path that the
parallel paths already use as their authoritative fallback, sharing its
framing, footer verification, trailing-garbage detection, and output limit,
so it is verified identically but is not decoded in parallel.
DecoderStatsandDecodeReportpreserve the configured thread budget while
reporting an effective target of one and no spawned worker or auxiliary
threads. Nothing is spooled; input memory is one configured input window.
A streamingDecoderReaderadvances a resumable sequential decoder in the
caller'sRead::read, so dropping it immediately drops the source and cannot
leave a coordinator blocked on a stalled producer.