Skip to content

Commit 4610c91

Browse files
authored
Release v0.3.6 (#36)
1 parent 464a904 commit 4610c91

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

CHANGES.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## 0.3.6
4+
5+
This release improves end-to-end decoding peformance for PNG images by 10% on average,
6+
with select images benefitting by as much as 50%.
7+
These improvements were inspired by the algorithms in `zune-inflate`.
8+
9+
- Optimized building the Huffman table, which helps the performance of small images ([#31])
10+
- Dropped the specialized fast path for a hardcoded Huffman table, which is no longer necessary ([#32])
11+
- Add a fast path to the DEFLATE decoding loop that processes more bytes at a time, benefitting performance on large images ([#34])
12+
- Re-add test files into the crates.io tarball since they are so small. They may be removed in the future if they grow in size ([#35])
13+
14+
[#31]: https://github.com/image-rs/fdeflate/pull/31
15+
[#32]: https://github.com/image-rs/fdeflate/pull/32
16+
[#34]: https://github.com/image-rs/fdeflate/pull/34
17+
[#35]: https://github.com/image-rs/fdeflate/pull/35
18+
19+
320
## 0.3.5
421

522
- Fix handling of invalid inputs, so that errors are consistently detected

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "fdeflate"
3-
version = "0.3.5"
3+
version = "0.3.6"
44
edition = "2021"
55

66
# note: when changed, also update test runner in `.github/workflows/rust.yml`

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
[![Documentation](https://docs.rs/fdeflate/badge.svg)](https://docs.rs/fdeflate)
55
[![Build Status](https://img.shields.io/github/actions/workflow/status/image-rs/fdeflate/rust.yml?label=Rust%20CI)](https://github.com/image-rs/fdeflate/actions)
66

7-
A fast deflate implementation.
7+
A fast and safe deflate implementation for PNG.
88

9-
This crate contains an optimized implementation of the deflate algorithm tuned to compress PNG
10-
images. It is compatible with standard zlib, but make a bunch of simplifying assumptions that
11-
drastically improve encoding performance:
9+
This crate contains an optimized implementation of the [deflate algorithm](https://en.wikipedia.org/wiki/Deflate) tuned for PNG images.
10+
11+
At least on PNG data, our decoder rivals the performance of `zlib-ng` and `zlib-rs` without using any `unsafe` code.
12+
13+
When compressing it makes a bunch of simplifying assumptions that
14+
drastically improve encoding speed while still being compatible with zlib:
1215

1316
- Exactly one block per deflate stream.
1417
- No distance codes except for run length encoding of zeros.
1518
- A single fixed huffman tree trained on a large corpus of PNG images.
1619
- All huffman codes are <= 12 bits.
1720

18-
It also contains a fast decompressor that supports arbitrary zlib streams but does especially
19-
well on streams that meet the above assumptions.
20-
2121
### Inspiration
2222

2323
The algorithms in this crate take inspiration from multiple sources:

0 commit comments

Comments
 (0)