How woltapp/blurhash works
Project type and purpose
• This is an open-source, multi-language library and tooling project (“BlurHash”) that provides a compact image placeholder encoding/decoding algorithm and demos in C, Swift, Kotlin (Android), TypeScript (web), Python integration, plus a supporting website and docs.
• Purpose: allow back-ends to encode images into short strings, store those, and clients to decode them as low-res previews while main images load.
File structure
• Top-level folders:
• C – portable C encoder/decoder
• Swift – iOS/macOS library, demo app, XCTest suite
• Kotlin – Android library + demo app
• TypeScript – encoder/decoder + demo web page
• Python – wrapper around the C encoder
• Website – marketing/demo site built with Node, Babel, Webpack
• Media, Algorithm.md, Readme.md, Security/License, CodeOfConduct
• Build & config files: Makefile (C), Xcode project (Swift), Gradle (Kotlin), tsconfig/webpack (TypeScript), package.json, deploy.sh (website).
• Demos: each language folder contains a “demo” or “test” harness that consumes its local library.
README for additional insights
• Core algorithm lives in Algorithm.md and in each language’s encode/decode implementations.
• README lists dependencies (stb_image/stb_writer in C, AndroidX in Kotlin, UIKit/SwiftUI in Swift, React-less TS demo via vanilla JS, Node build tools for website).
• Use cases: back-end encoding, client-side decoding, placeholder UI, extensibility to new languages.