Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
B

blazediff

> 编程语言
Open source

Blazing-fast diff ecosystem for JavaScript applications

325 stars0 likes1 views
WebsiteGitHub

About

Blazing-fast diff ecosystem for JavaScript applications

BlazeDiff is a high-performance diff ecosystem. Originally built in JavaScript as a pixel-perfect image comparison library that's 1.5x faster than pixelmatch. Now, BlazeDiff has evolved into a comprehensive suite of blazing-fast diff tools including image comparison, image diff analysis deterministically + agent-in-the-loop verdict, object diffing, perceptual quality metrics, framework-agnostic UI renderers, and React components for visualizing differences.

Available Packages

Core Libraries

  • @blazediff/core-native - The fastest single-threaded image diff in the world (Rust + SIMD, 4.4-4.9x faster than odiff on 4K images)
  • @blazediff/core-wasm - WebAssembly build of the same Rust algorithm (wasm32 + v128 SIMD, ~51% faster than pixelmatch). For browsers, edge runtimes, and any wasm host.
  • @blazediff/core - Pixel-perfect image comparison (1.5x faster than pixelmatch)
  • @blazediff/interpret-native - Native Rust structured interpretation of a diff: what changed in each region, where, and how much - not just which pixels differ
  • @blazediff/object - High-performance object diffing with detailed change tracking
  • @blazediff/ssim - SSIM, MS-SSIM, and Hitchhiker's SSIM for perceptual quality assessment
  • @blazediff/ssim-native - Native Rust build of the same metrics plus perceptual SSIM (~15x faster than the JS port; ~4x for Hitchhiker's)
  • @blazediff/gmsd - Gradient Magnitude Similarity Deviation metric

Rust Crates

  • blazediff - The Rust crate powering @blazediff/core-native: block-based image diffing with SIMD (source)
  • blazediff-png - From-scratch PNG codec in Rust, single-threaded and SIMD-first, with byte-exact decode parity to libspng and faster on every fixture (source)
  • blazediff-ssim - SSIM, MS-SSIM and Hitchhiker's SSIM in Rust, dependency-free and SIMD-vectorised, held to the reference MATLAB scripts through Octave (source)
  • blazediff-interpret - Structured region analysis for image diffs: classify what changed, not just where. Powers @blazediff/interpret-native (source)

Python Packages

  • blazediff - Python bindings (via maturin) for the Rust diff core (source)
  • blazediff-ssim - Python bindings for the SSIM family, imported as blazediff_ssim (source)
  • blazediff-interpret - Python bindings for the region classifier, imported as blazediff_interpret (source)

Command Line Tools

  • @blazediff/cli - JS CLI with multiple algorithms (diff, GMSD, SSIM, MS-SSIM, Hitchhiker's SSIM)
  • @blazediff/agent - Agentic visual regression. Auto-discovers routes, captures deterministic screenshots, and hands ambiguous diffs back to your coding agent (Claude Code, Cursor, Codex) to judge.

UI Components

  • @blazediff/react - React components for diff visualization
  • @blazediff/ui - Headless engine + framework-agnostic renderer for image-diff UIs

Quick Links

  • Documentation - Complete API reference and guides
  • Examples - Interactive demos and code samples
  • Benchmarks - Performance comparisons and metrics

Installation

BlazeDiff packages are dual-published. Install from whichever registry fits your runtime.

bash
# Node / Bun via npm
npm install @blazediff/core
bun i @blazediff/core

# Deno / Bun via JSR
deno add jsr:@blazediff/core
bunx jsr add @blazediff/core

# Rust via Cargo
cargo add blazediff

# Python via pip
pip install blazediff blazediff-ssim blazediff-interpret

Every package above is available on both registries except the test-runner adapters (@blazediff/vitest, @blazediff/jest, @blazediff/bun) and the UI libraries (@blazediff/ui, @blazediff/react), which remain NPM-only - the adapters augment each runner's Matchers types and the UI packages have browser-DOM and React type surfaces that JSR's publish-time slow-types check doesn't allow. Native-binary sub-packages under @blazediff/core-native-*, @blazediff/ssim-native-* and @blazediff/interpret-native-* are also NPM-only; Deno consumers resolve them transparently via npm: specifiers declared inside the parent package.

Performance

BlazeDiff delivers significant performance improvements across all components:

  • Native (Rust): 4.4-4.9x faster than odiff on 4K images (5.7-6.7x from encoded buffers)
  • WASM: ~51% faster than pixelmatch, up to ~10x on 4K (browser, edge, any wasm host)
  • Image Pixel-by-Pixel (JS): ~50% faster than pixelmatch (up to 88% on identical images)
  • SSIM (JS): ~30% faster than ssim.js, ~75% faster with Hitchhiker's SSIM
  • SSIM (Rust): ~15x faster again than the JS port (~4x for Hitchhiker's SSIM), from the same decoded buffers
  • Object Diff: ~55% faster than microdiff (up to 96% on identical arrays)

View Detailed Benchmarks - Complete performance data, test methodology, and hardware specifications.

Contributing

Contributions are welcome! Please see the Contributing Guide for details.

License

MIT License - see LICENSE file for details.

Algorithm Licenses

The @blazediff/ssim and @blazediff/gmsd packages implement perceptual quality metrics based on published research. See the licenses folder for detailed attribution and licensing information:

  • SSIM - Zhou Wang et al., IEEE 2004
  • MS-SSIM - Zhou Wang et al., Asilomar 2003
  • Hitchhiker's SSIM - Venkataramanan et al., IEEE Access 2021

Acknowledgments

  • Image diffing built on the excellent pixelmatch algorithm
  • SSIM and MS-SSIM based on groundbreaking research by Zhou Wang, Alan C. Bovik, and colleagues
  • Hitchhiker's SSIM based on research by Venkataramanan, Wu, Bovik, Katsavounidis, and Shahid
  • GMSD based on research by Xue, Zhang, Mou, and Bovik

Built for high-performance difference detection across images and data structures

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustcodeccomparisondiffimage

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言