Skip to content

Releases

v0.2.1

Choose a tag to compare

@TheWillard TheWillard released this 06 Nov 18:52

Changed

  • Decompression reads its input forward only, without seeking back to peek
    at bytes. Seeking discarded the buffer of a BufReader on every peek, which
    made reading through one up to 30% slower.
  • decompress_bounded and decompress_all_bounded reserve max_size up
    front (at most 1 MiB) instead of growing the output from empty.
  • Literal runs are read straight into the output, without a temporary buffer.

v0.2.0

Choose a tag to compare

@TheWillard TheWillard released this 05 Nov 21:47

Added

  • Error::LookbehindOverrun: returned by decompress, decompress_all and
    the bounded variants when a match reaches before the start of the output,
    which means the input is corrupt (#3).

Changed

  • Breaking: Error is #[non_exhaustive], so future error variants
    aren't breaking changes. matches on it need a wildcard arm (#3).
  • Breaking: requires Rust 1.85 (edition 2024) (#4).
  • expected_size reserves at most 1 MiB up front. The output still grows to
    whatever size the data decompresses to (#3).

Fixed

  • Corrupt input no longer makes decompression panic with an index out of
    bounds. Matches before the start of the output wrapped the read position
    around, in the bounded and unbounded functions (#3).
  • expected_size of Some(usize::MAX) no longer panics with a capacity
    overflow, and large sizes are no longer allocated before reading any
    input (#3).
  • Docs build on docs.rs again: the doc_auto_cfg feature was removed from
    nightly Rust in 1.92, doc_cfg replaces it. The 0.1.1 docs failed to build.

v0.1.1

Choose a tag to compare

@TheWillard TheWillard released this 05 Nov 21:15

[0.1.1] - 2026-11-05

Added

  • decompress_bounded and decompress_all_bounded: they return
    Error::OutputOverrun if the decompressed output would exceed max_size,
    which guards against untrusted or malicious input (#2, thanks @fanyang89).

Fixed

  • Use std::ptr::{copy_nonoverlapping, write_bytes} instead of the
    std::intrinsics re-exports, which fixes builds on newer Rust toolchains (#2).
  • Doc typos and clarified that expected_size is only an allocation hint.