Systems · 2026
Codec Explorer
Interactive image-compression lab: a C++ codec core compiled to WebAssembly, comparing DCT and wavelet pipelines in the browser.
- Outcome
- Makes transform-based image compression observable: change the quality and watch coefficients, quantization, and artifacts update in real time.
- Stack
- C++17 / WebAssembly / Svelte
- Status
- Active
- Core
- C++17, CMake
- Runtime
- WebAssembly (Emscripten)
- Frontend
- Svelte 5 + TypeScript
- Transforms
- 8×8 DCT, Haar, CDF 9/7
- Metrics
- PSNR, SSIM, rate–distortion
Overview
An interactive lab for seeing how transform-based image compression works. An image is converted from RGB to YCbCr, transformed with an 8×8 DCT, a Haar wavelet, or the CDF 9/7 wavelet used in JPEG 2000, quantized, and reconstructed, with PSNR and SSIM reported per channel. A block inspector shows coefficient heatmaps, zig-zag ordering, and zero runs, and lets you drop coefficients to watch a block degrade; artifact maps highlight where the reconstruction differs from the original, and clicking a hotspot opens that block. A subband view shows the wavelet pyramid, and rate–distortion curves built from a per-subband entropy estimate compare the three transforms. Settings are shareable through the URL. The codec core is C++17 compiled to WebAssembly with Emscripten, with a native OpenCV build and contract tests across the WASM boundary. CI runs on every push, and the site deploys to Vercel.