npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bitruvius/turbo-webp

v0.3.1

Published

TurboWebP: WebP image decoder for the browser, pure-Rust wasm

Readme

@bitruvius/turbo-webp

WebP decode in the browser. Byte-identical to libwebp, without libwebp.

Your existing WebP files, your existing pipeline, your existing tooling. Swap the decoder implementation and keep everything else: decoded RGBA bytes are byte-identical to libwebp on every input.

Turbocharged by Bitruvius TurboWebP.

Why it is faster

libwebp's lossy decode path has been frozen at SSE2/SSE4.1 since around 2012, and AVX2 only landed for the lossless path in libwebp 1.6.0. TurboWebP is a from-scratch Rust codec with current SIMD on every target it ships to.

Bitruvius' summary of the decode result: "Decode the same files. Get there ~20% faster."

| Tile size | Decode speedup vs libwebp 1.6.0, Win AVX2 | |---|---| | 256² | 1.03× | | 512² | 1.20× | | 1024² | 1.23× | | 2048² | 1.24× |

Pooled decode over a 400-sample real-world geospatial and EO corpus, n=100 per tile size, files produced by libwebp m=6, measured on Win AVX2 (Intel Core Ultra 9). Counting every cell in the published matrix: 27 of 32 decode cells faster on Win AVX2, 20 of 32 on Mac NEON (Apple M3 Max), 47 of 64 cross-host. Those figures are measured on the native builds. This package is the same codec compiled to WASM SIMD128.

Memory-safe implementation. The codec is Rust, not C, so it removes the CVE-2023-4863 risk class rather than only the bugs that have been patched so far. Bitruvius reports the turbowebp-safe implementation as zero-unsafe. No emscripten anywhere in the build.

Use it

import { WebpDecoder } from '@bitruvius/turbo-webp';

const decoder = new WebpDecoder();
const img = await decoder.decode(bytes); // bytes: Uint8Array of a .webp file

// img.rgba is RGBA8, length img.width * img.height * 4
const pixels = new ImageData(new Uint8ClampedArray(img.rgba), img.width, img.height);

That is the whole API. decode() returns { width, height, hasAlpha, rgba }. Construct the decoder once and reuse it; the wasm initializes on the first decode and is shared from there.

Serving the wasm yourself, from a CDN or a cross-origin host:

const decoder = new WebpDecoder({
  wasmInit: { wasmUrl: 'https://cdn.example.com/turbowebp_wasm_bg.wasm' },
});

The wasm is a process-wide singleton, so the first decode wins: whichever decoder decodes first supplies the wasmInit that takes effect.

What ships

npm i @bitruvius/turbo-webp

Decoder only. This package decodes WebP. It does not encode. TurboWebP's encoder is part of the native library, not this browser build, so do not plan a write path around this dependency.

Every still-image bitstream family decodes: lossy VP8 , lossless VP8L, and the extended VP8X container with an ALPH alpha chunk. That matrix is asserted against the shipped wasm in src/webp-conformance.test.ts, over fixtures encoded by libwebp 1.6.0. Animated WebP (ANIM/ANMF) is not supported and rejects.

The wasm is committed to the package, so there is nothing to download at build time. The one runtime dependency is @bitruvius/foundation, installed with it. Allow script-src 'wasm-unsafe-eval' in your CSP. A self-contained ESM bundle and a script-tag build are also published on the Bitruvius CDN if you would rather skip the bundler entirely.

Learn more

Trademarks

WebP is a trademark of Google LLC. Google and libwebp are trademarks of Google LLC. Intel and Intel Core are trademarks of Intel Corporation. Apple is a trademark of Apple Inc. Arm and Neon are trademarks of Arm Limited. Rust is a trademark of the Rust Foundation. All other marks are the property of their respective owners.

These names are used solely to describe the data formats this software interoperates with, the hardware the published figures were measured on, and the language it is written in. Bitruvius is not affiliated with, sponsored by, or endorsed by any of them, and no such relationship is implied.

License

Proprietary. The full terms ship as LICENSE inside this package, and are readable before installing at cdn.bitruvius.com/legal/sdk-license-v1.txt.

© Bitruvius, Inc.