Pure MoonBit JPEG-LS Part 1 streaming codec with abbreviated formats, restart intervals and extended geometry
node sdk/build.mjs
node web/build.mjs
python -m http.server 8000 --bind 127.0.0.1 --directory web/distprintf 'P5\n3 2\n255\n\000\177\377\001\052\020' |
moon run --target native cmd/moonjls -- encode-pgm 0 - sample.jls 7
moon run --target native cmd/moonjls -- inspect sample.jls --json| Stage | Delivered capability | Evidence |
|---|---|---|
| M2 | Coded precision 2–16 bits, explicit MAXVAL, legal NEAR, LSE1 presets | 388-case M2 matrix |
| M3-A | Non-interleaved multi-component scans and cross-scan LSE1 defaults | M3-A acceptance |
| M3-B | ILV=1 line interleave, ILV=2 sample interleave, H/V sampling and edge MCU handling | Annex E 12/12 on JS, Wasm GC and Native |
| Point transform | Unmapped Pt=0–15, separate error domains, exact 32-bit output | Independent Pt and sampling validation |
| M4 increment | Interchange encoding and decoding of embedded LSE2/LSE3 tables (Wt=1–255), including replacement and per-component selection | Mapping vector results |
| M4 table streams | C.4 frameless table encode and load with immutable snapshots | C.4 conformance |
| M4 abbreviated images | C.3 encode and decode against explicit external mapping snapshots | C.3 conformance |
| M4 restart intervals | DRI and RST state resets across all interleave modes | Restart verification |
| M4 deferred and extended geometry | DNL, LSE4 and legal marker positions | Frame geometry and marker verification |
moon test core --target js --deny-warn
moon test core --target wasm-gc --deny-warn
CC=clang moon test core --target native --deny-warnInstall
Download zipPure MoonBit JPEG-LS Part 1 streaming codec with abbreviated formats, restart intervals and extended geometry