TurboWebP
A pure-Rust, memory-safe WebP encoder + decoder that is a drop-in replacement for libwebp 1.6.0 with the SIMD acceleration, safety, and cross-architecture determinism that the C reference can’t offer.
- Lossless encode: 1.27×–4.5× faster than libwebp method=6 across 256² – 2048² tile sizes on both AVX2 and NEON; within ~4% of libwebp’s apex size at pooled-corpus scale; two cells beat libwebp m=6 outright on output size.
- Lossless decode: faster than libwebp at every size ≥ 512² on AVX2 — 27 of 32 pooled cells faster than libwebp 1.6.0.
- Lossy decode: 131/131 byte-identical with libwebp on the conformance corpus.
- Lossy encode: byte-identical with libwebp at q=75 on the 144-input synthetic parity floor; matches libwebp’s RD curve on natural content with calibration differences documented (issues #77, #80).
- Cross-architecture byte-identical encode output (AVX2, NEON, WASM SIMD128, scalar) — same input → same bytes everywhere.
- 8 platforms from a single release: Linux (x86_64 gnu/musl, aarch64), macOS (x86_64, aarch64), Windows (x86_64-msvc), WebAssembly (wasm32-unknown, wasm32-wasip1) — with real SIMD128 in WASM for browser-side decode and edge-runtime image transforms.
Drop-in for libwebp 1.6.0
TurboWebP ships the same 5 shared libraries as upstream libwebp, with byte-compatible C ABI and matching SONAME / install_name / Windows DLL names:
libwebp.so.7/libwebp.7.dylib/libwebp-7.dlllibwebpdecoder.so.3/libwebpdecoder.3.dylib/libwebpdecoder-3.dlllibwebpdemux.so.2/libwebpdemux.2.dylib/libwebpdemux-2.dlllibwebpmux.so.3/libwebpmux.3.dylib/libwebpmux-3.dlllibsharpyuv.so.0/libsharpyuv.0.dylib/libsharpyuv-0.dll
Drop them into the consumer’s library search path (replacing the system libwebp libraries), and every libwebp-linking application keeps working unchanged — GDAL, Pillow, ImageMagick, ffmpeg, libvips, libheif, custom C/C++ code, anything that links -lwebp.
Memory safety
libwebp is C. It carries the multi-decade history of memory bugs that comes with manual memory management — most prominently CVE-2023-4863, the actively-exploited heap buffer overflow in libwebp’s BuildHuffmanTable that shipped via Chrome and most major messaging platforms before patched libwebp 1.3.2 landed.
TurboWebP is pure Rust. The consumer-facing API contains zero unsafe. Internal SIMD intrinsic call sites require unsafe blocks (because that’s how the standard library exposes them) but the unsafety is bounded and auditable in one grep. If you parse untrusted WebP input — content from a CDN, an upload pipeline, an email attachment, an HTML page — TurboWebP removes a class of vulnerability that the C library cannot.
Free to decode, free to integrate
Decoding WebP (lossless or lossy, including animated .webp) requires no license and no runtime check. The free decoder-only variant ships every release; download it from the public decoder downloads page or from the GitHub Release assets.
Every viewer / preview / image-processing pipeline runs unrestricted:
- All
WebPDecode*byte-identical to libwebp on the 43-file conformance corpus. - Incremental decode (
WebPI*), per-frame animation decode (WebPAnimDecoder*). - YUV plane I/O with bit-exact BT.601 conversion.
- Drop-in for the libwebp.so.7 + libwebpdecoder.so.3 + libwebpdemux.so.2 chain.
Encode — licensed
Producing WebP blobs requires a Bitruvius license. That covers:
- VP8L lossless encode (byte-identical to libwebp at apex; 1.27×–4.5× faster across all tile sizes).
- VP8 lossy encode (byte-identical at q=75 on the synthetic parity floor; same RD curve as libwebp on natural content).
- Animation encode via
WebPMux*+WebPAnimEncoder*(animated WebP for Pillow, ImageMagick, ffmpeg). - All 4 supported SIMD backends (AVX2, NEON, WASM SIMD128, scalar fallback).
Access
Sign in to the customer portal to download binaries, generate a license, and read the full documentation:
- Download binaries — prebuilt static + shared libraries for every supported platform, plus upstream-compatible headers and
pkg-configfiles. Signed URLs, 15-minute expiry. - Full documentation — install guides, quickstart, drop-in procedures for GDAL / Pillow / ImageMagick / ffmpeg, API reference (symbol coverage table, bit-exact parity contract), performance benchmarks, and license activation.
- License management — generate, view, and rotate license keys.
No account yet? Your Bitruvius contact provisions customer users once your contract is active.