


This crate is an independent implementation of the WebP image format, written sothat theimage crate can have a pure-Rust WebP backend for both encoding anddecoding.
Decoder: Supports all WebP format features including both lossless andlossy compression, alpha channel, and animation. Both the "simple" and"extended" formats are handled, and it exposes methods to extract ICC, EXIF,and XMP chunks. Decoding speed is generally in the range of70-100% of thespeed of libwebp.
Encoder: This crate only supports lossless encoding. The encoderimplementation is relatively basic which makes it very fast, but it doesn'tget as good compression ratios as libwebp can. Nonetheless, it often producessmaller files than PNG, even when compared against the slowest/highestcompression options of PNG encoders.
We continue to be interested inoptimizations andbug fixes and hopethe bring the decoder closer to parity with libwebp.
Another potential area isanimation encoding. Much of the groundwork is inplace for this, but it will require some additional work to implement.
We would like to addlossy encoding support, but this is a non-trivialtask and would require a lot of work. If you are interested in helping withthis, please get in touch!
Both this crate and all of its dependencies currently contain no unsafe code.
NOTE: This isn't a guarantee that unsafe code will never be added. It may provenecessary in the future to improve performance, but we will always strive tominimize the use of unsafe code and ensure that it is well-tested anddocumented.
$ cargo geigerMetric output format: x/y x = unsafe code used by the build y = total unsafe code found in the crateSymbols: 🔒 = No `unsafe` usage found, declares #![forbid(unsafe_code)] ❓ = No `unsafe` usage found, missing #![forbid(unsafe_code)] ☢️ = `unsafe` usage foundFunctions Expressions Impls Traits Methods Dependency0/0 0/0 0/0 0/0 0/0 🔒 image-webp 0.2.30/0 0/0 0/0 0/0 0/0 🔒 ├── byteorder-lite 0.1.00/0 0/0 0/0 0/0 0/0 ❓ └── quick-error 2.0.10/0 0/0 0/0 0/0 0/0