HeadlinesBriefing favicon HeadlinesBriefing.com

SplatHash: 16-Byte Image Compression Beats BlurHash Speed

Hacker News •
×

A developer has created SplatHash, a new image placeholder generator that compresses any image to just 16 bytes while producing a 32×32 blurry preview. The tool achieves decode speeds of 0.067 ms, making it significantly faster than existing solutions like BlurHash and ThumbHash. Written in Go with TypeScript and Python ports, SplatHash produces bit-for-bit identical hashes across all implementations.

SplatHash uses a sophisticated approach involving background color, six Gaussian blobs, and Ridge Regression optimization in the Oklab color space. The 128-bit packed format supports alpha channels and offers cross-language parity that competitors lack. Benchmarks on an Intel Core i5-9300H show SplatHash decoding in 0.067 ms compared to 0.50 ms for ThumbHash and 6.55 ms for BlurHash, while encoding takes just 3.53 ms.

The tool targets web applications where placeholder generation happens on every page load. With its fixed 16-byte output size and superior decode performance, SplatHash offers a compelling alternative for developers seeking faster image loading experiences. The project includes comprehensive documentation, benchmarks, and a comparison tool showing side-by-side previews of different encoding methods.