weezl
Fast LZW compression and decompression.
0.2.1
125M downloads/mo
#709 most downloaded on crates.io
image-rs/weezl
What this package is like to depend on
Last release 3 months ago
15 May 2026
Release timing varies
gaps range from 3 weeks to 1.5 years
Most releases are documented
notes for 14 of 16 stable releases
1 version withdrawn
withdrawn after publishing
6 years old
20 releases · first in 2020
4 releases in the last 12 months
see the full history below
Release timeline
20 releases · Jun 2020 to May 2026Releases
latest 20-
0.2.115 May 2026Release notes
Open source →- Fix a bug that overwrote some initial entries in streams that do not use
clear codes immediately with a full dictionary.
- Fix a bug that overwrote some initial entries in streams that do not use
-
0.2.014 May 2026Release notes
Open source →- Overhaul of the decoder algorithm, inspired by Wuffs, to write 8 bytes at once and construct a tree accordingly. Many streams are now decoded with GB/s performance (#77). See the tradeoff in the next bullet point.
- Initialization of a decoder is now more expensive as we pre-allocate fixed size tables. This is so that decoding no longer performs bounds checks in most of its inner loops which significantly affects performance. If this is prohibitive for your use-case, please open an issue to discuss.
- 0 and 1 bit data-sizes are now fully supported. Note that 0-bit data uses an initial 2 bit code width, and 1-bit data uses 3 bits with TIFF size switch (#67, #78).
Fixes:
- Decoding codes with an initial code size of 12 sometimes failed to detect malformed streams, causing a panic or malformed output (#64).
- A small output buffer can no longer cause an erroneous
NoProgressstatus when the progress was filling (only) the internal word buffer (#68). Decoding from a stream or other abstraction could silently forget data.
-
0.1.1211 Nov 2025Release notes
Open source →- Further adjusted a debug assertion for TIFF compatibility. It still had one of its OR conditions formulated incorrectly, relying on equality of the code word mask and the size switch code. In TIFF we hit the limit of the code dictionary (all 12-bit words) one code later than we would detect a code switch that we need to ignore.
-
0.1.1108 Nov 2025Release notes
Open source →- Adjusted a debug assertion that handled 1-bit code sizes incorrectly in the
decoder (relevant for TIFF but non-standard for GIF). In that case the size
switch semantics are a bit messy.
Release notes
Open source →- Adjusted a debug assertion that handled 1-bit code sizes incorrectly in the decoder (relevant for TIFF but non-standard for GIF). In that case the size switch semantics are a bit messy.
- Adjusted a debug assertion that handled 1-bit code sizes incorrectly in the
-
0.1.1022 May 2025Release notes
Open source →- Reverted changes made in 0.1.9 to the behavior of the decoder under non
libtiff-compatibility mode. Trying to read the decoder with an empty output
buffer will at least inspect the next symbol and either error or indicate the
end-of-stream accordingly.
Release notes
Open source →- Reverted changes made in 0.1.9 to the behavior of the decoder under non libtiff-compatibility mode. Trying to read the decoder with an empty output buffer will at least inspect the next symbol and either error or indicate the end-of-stream accordingly.
- Reverted changes made in 0.1.9 to the behavior of the decoder under non
-
0.1.914 May 2025 withdrawnRelease notes
Open source →- Increased decoding throughput by 3—30% depending on CPU and data.
- Added
{encode,decode}::Configurationas builder types for their respective
module. They can be cheaply cloned. - Added
decode::Configuration::with_yield_on_full_bufferto explicitly opt-in
to libtiff compatibility. The decoder will not read or interpret further
symbols of the decoding stream when the output buffer is full. This enables a
caller to stop fetching symbols and elide an end of stream marker based on
out-of-band length information. The decoder might otherwise error, trying to
interpret data that does not belong to the stream.
Release notes
Open source →- Increased decoding throughput by 3—30% depending on CPU and data.
- Added
{encode,decode}::Configurationas builder types for their respective module. They can be cheaply cloned. - Added
decode::Configuration::with_yield_on_full_bufferto explicitly opt-in to libtiff compatibility. The decoder will not read or interpret further symbols of the decoding stream when the output buffer is full. This enables a caller to stop fetching symbols and elide an end of stream marker based on out-of-band length information. The decoder might otherwise error, trying to interpret data that does not belong to the stream.
-
0.1.822 Jan 2024 -
0.1.710 Jul 2022 -
0.1.621 Apr 2022Release notes
Open source →- Fixed an integer overflow and panic that could occur during decoding.
Decoding performance may degrade after long sequences without a reset code.
9c97e489d8f836838d497091de568cf16b117486d529ec5579233521065bd5e4 target/package/weezl-0.1.6.crate
Release notes
Open source →- Fixed an integer overflow and panic that could occur during decoding. Decoding performance may degrade after long sequences without a reset code.
- Fixed an integer overflow and panic that could occur during decoding.
-
0.1.517 Apr 2021Release notes
Open source →- Added
IntoVecadapters that simplify in-memory de- and encoding. A further
'one-shot' interface is exposed in theDecoderandEncoderthemselves
which makes the process a one liner in the simplest cases. Contrary to
IntoStream, these are available in all cases and do not requirestd.
sha256sum:
d8b77fdfd5a253be4ab714e4ffa3c49caf146b4de743e97510c0656cf90f1e8e target/package/weezl-0.1.5.crateRelease notes
Open source →- Added
IntoVecadapters that simplify in-memory de- and encoding. A further 'one-shot' interface is exposed in theDecoderandEncoderthemselves which makes the process a one liner in the simplest cases. Contrary toIntoStream, these are available in all cases and do not requirestd.
- Added
-
0.1.429 Jan 2021Release notes
Open source →- Added
IntoAsyncadapters for asynchronous de- and encoding. The interface is implemented only in terms offutures = 0.3traits at the moment. - Code sizes smaller than 2 are now allowed for decoding. Since they do not roundtrip it is still an error to use them in the decoder but this avoids accidental panicking, i.e. denial of service, in parsers.
- Added
-
0.1.310 Nov 2020Release notes
Open source →- Fixes an issue in compression that caused some data to be lost around clear codes. This could corrupt the data stream.
-
0.1.223 Oct 2020 -
0.1.101 Oct 2020Release notes
Open source →- The
IntoStreamtypes now reuse their internal buffers. - Added the methods
set_buffer,set_buffer_sizetoIntoStreamfor both the encoder and decoder, used to control the automatic allocation. - Deprecated
IntoStreamin configurations without thestdfeature where the type can't even be constructed.
- The
-
0.1.022 Aug 2020Release notes
Open source →- Initial major release
- Support gif and tiff code size changes
- Rough performance numbers: On i5-4690, 8GiB DIMM DDR3 Synchronous 1600 MHz (0,6 ns) ~70MB/s encode, ~230MB/s decode
-
0.1.0-beta.119 Aug 2020 pre-releaseNothing published for this version
-
0.1.0-beta.016 Aug 2020 pre-releaseNothing published for this version
-
0.1.0-alpha27 Jul 2020 pre-releaseNothing published for this version
-
0.0.220 Jul 2020Nothing published for this version
-
0.0.129 Jun 2020Nothing published for this version