wai-web: expose the byte-exact JPEG-AI mANS decode to wasm (decodeJpegAiMans) #51

Merged
dcharlot merged 1 commit from wai-jpegai-wasm-demo into main 2026-08-01 19:26:06 -04:00
Owner

Adds a wasm-bindgen entry for the ISO/IEC 6048 JPEG-AI entropy decoder, driving the live /jpegai reproduction-vector demo.

Verified end-to-end in a real browser (Playwright/Chrome on the live site): the wasm decode reproduces the native cross-arch golden exactly — 172 coded positions, 0 mismatches — and the in-tab blake3 of the decoded symbols equals the native reference hash dce09d34…. Same pure-i64 Rust a native sink runs, compiled to wasm32; no float, no ML runtime.

The demo page + wasm assets are already deployed at wai.transaction.science/jpegai (static portal, deployed via deploy.sh).

Co-Authored-By: Claude Opus 4.8 [email protected]

Adds a wasm-bindgen entry for the ISO/IEC 6048 JPEG-AI entropy decoder, driving the live `/jpegai` reproduction-vector demo. **Verified end-to-end in a real browser** (Playwright/Chrome on the live site): the wasm decode reproduces the native cross-arch golden exactly — 172 coded positions, 0 mismatches — and the in-tab blake3 of the decoded symbols equals the native reference hash `dce09d34…`. Same pure-i64 Rust a native sink runs, compiled to wasm32; no float, no ML runtime. The demo page + wasm assets are already deployed at wai.transaction.science/jpegai (static portal, deployed via deploy.sh). Co-Authored-By: Claude Opus 4.8 <[email protected]>
The ISO/IEC 6048 JPEG-AI entropy decoder (`wai::jpegai_mans`) as a browser entry:
given the reference stream, the integer PMF rows, the per-distribution bounds, and
the per-position σ indices + coded-position masks, it rebuilds the decode tables and
returns the decoded residual symbols. The same pure-i64 Rust a native sink runs,
compiled to wasm32 — no float, no ML runtime — so the symbols are byte-identical to
the native decode, and their hash is portable across host and browser.

Verified: the wasm decode reproduces the native cross-arch golden exactly (172 coded
positions, 0 mismatches) and hashes to the same digest. Drives the /jpegai
reproduction-vector demo.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Transaction-Science/open-standards!51
No description provided.