Safe public Rust APIs for JPEG 2000 Part 1 and HTJ2K Part 15 inspection, decode, encode, recode, and coefficient-domain JPEG-to-HTJ2K transcode workflows.
CPU is the correctness baseline. CUDA and Apple Metal backends accelerate supported paths.
JPEG 2000 Part 1◆HTJ2K Part 15◆JP2 / JPH◆CPU baseline◆CUDA backend◆Metal backend◆JPEG 2000 Part 1◆HTJ2K Part 15◆JP2 / JPH◆CPU baseline◆CUDA backend◆Metal backend◆
01 / Public surface
Why J2K exists
01
Safety
Safe public Rust APIs
The public codec surface is safe Rust. Audited unsafe code is isolated at FFI, GPU integration, architecture-specific SIMD/intrinsic, allocation, and bounded pointer or buffer boundaries; the unsafe audit is authoritative.
02
Routing
GPU-accelerated backends
Applications keep a portable CPU path while routing supported workloads to CUDA or Apple Metal under explicit backend policy.
03
Evidence
Permissive integration
The workspace is dual-licensed MIT or Apache-2.0, with benchmark claims gated by reproducible evidence instead of broad speed marketing.
02 / Architecture
Architecture
Still-image J2K/JP2 and HTJ2K/JPH surfaces meet in one public crate. CPU stays the portable correctness baseline; CUDA and Metal accelerate supported shapes under explicit policy.
System map / static topology
Automatic routing may return CPU output when a device path is unavailable, unsupported, or not benchmarked for the requested shape. Explicit CUDA and Metal requests are strict.
03 / Support boundary
Support boundary
Exact coverage is maintained in the public support matrix.
In scope
JPEG 2000 Part 1
Raw J2K/J2C codestream parse, inspect, decode, encode, ROI, progression, tile-part, packet-marker, signed, high-bit, and component-plane surfaces are tracked by the public support matrix.
In scope
HTJ2K Part 15
HT cleanup and refinement decode/encode, quality layers, rate behavior, raw HT codestreams, and JPH still-image wrapping are in scope.
Boundary
Wrappers and limits
JP2 and JPH still-image metadata paths are covered. JPX / JPEG 2000 Part 2 extensions and public speed claims require separate evidence.
Exact row-by-row support status lives in docs/public-support.md. Published benchmark notes live in docs/benchmark-evidence.md; broader adoption reports require pinned external corpora and comparator evidence.
04 / Install
Install
Most applications should start with the public facade crate. The CLI is useful for inspection and conservative JPEG-to-HTJ2K transcode smoke tests.
Library01
$ cargo add j2k
Safe public APIs for inspection, decode, encode, recode, JP2, and JPH.