This release focuses on improving compression efficiency and bringing nativewebp closer to libwebp behavior internally.
Compression improvements turned out to be much harder than expected, especially while trying to keep the encoder clean, predictable, and fully written in Go. I'm still actively working on further optimizations, but wanted to release this milestone now since it already delivers measurable gains of roughly 2β5% smaller files depending on the image set.
Changes
- Increased hash table size to better match libwebp behavior
- Increased backward reference chain depth
- Added CompressionLevel to encoder options
- Improved compression ratios by approximately 2β5%
- Improved decode safety by limiting reads to 256 MiB instead of using unrestricted io.ReadAll
Thanks again for all the feedback, benchmarks, issues, and testing support.
Happy encoding! π