Repository navigation
Releases
Releases · arma-tools/lzokay-native-rs
v0.2.1
Changed
- Decompression reads its input forward only, without seeking back to peek
at bytes. Seeking discarded the buffer of aBufReaderon every peek, which
made reading through one up to 30% slower. decompress_boundedanddecompress_all_boundedreservemax_sizeup
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
Added
Error::LookbehindOverrun: returned bydecompress,decompress_alland
the bounded variants when a match reaches before the start of the output,
which means the input is corrupt (#3).
Changed
- Breaking:
Erroris#[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_sizereserves 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_sizeofSome(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_cfgfeature was removed from
nightly Rust in 1.92,doc_cfgreplaces it. The 0.1.1 docs failed to build.
v0.1.1
[0.1.1] - 2026-11-05
Added
decompress_boundedanddecompress_all_bounded: they return
Error::OutputOverrunif the decompressed output would exceedmax_size,
which guards against untrusted or malicious input (#2, thanks @fanyang89).
Fixed
- Use
std::ptr::{copy_nonoverlapping, write_bytes}instead of the
std::intrinsicsre-exports, which fixes builds on newer Rust toolchains (#2). - Doc typos and clarified that
expected_sizeis only an allocation hint.