# C.3 abbreviated JPEG-LS images

T.87 C.3 allows an image to keep its SOS mapping selectors while the application supplies the mapping tables separately. MoonJLS can load an immutable C.4 snapshot, share it among simultaneous images, and encode or decode streams with some or all table definitions outside the image. A local LSE2 replaces the same ID for subsequent SOS segments in that image. LSE3 continues an adjacent in-stream definition. Each SOS uses its own effective MAXVAL and accepts a selected table with exactly MAXVAL + 1 entries. The image SOI resets LSE1 preset state. [ITU-T T.87 §7(c) and C.3](https://www.itu.int/rec/T-REC-T.87-199806-I/en) · [C.4 table API](TABLE_STREAM_RESULTS.md)

For a 4×1 two-bit image, create a C.4 table with ID 7 and entries `c9 d4 df ea`. Encode `00 03 01 02` from `indices.raw` in coding-domain units. The result has selector 7 without an inline LSE2. Decoding with the same table produces unsigned samples 201, 234, 212, 223.

```sh
moonjls encode-tables tables.jls --table 7,1,values.raw
moonjls encode-planar 4 1 2 1 0 indices.raw image.jls --mapping-selectors 7 --table-stream tables.jls
moonjls inspect image.jls --json --table-stream tables.jls
moonjls decode image.jls reconstruction.raw raw-le 1 --table-stream tables.jls
```

For Wt greater than one, choose `mapped-bytes` in the Native decoder or opaque rows in the SDK and Worker. In MoonBit, pass `external_tables=Some(snapshot)` to the image encoder or decoder. In the SDK, load the snapshot with `loadTableStream` and use `tableContext`. Worker jobs take `tableStream` bytes. No global table state persists between jobs. [API details](API.md)

The C.3 verifier uses fixed external-table pairs and a separate application of the tables to independently reconstructed indices. CharLS 3.0.0-dev can encode and decode the coded indices and read C.4 table bytes. Its decoder leaves table application to the caller. Its final format classification can miss an early external reference shadowed by a later definition with the same ID. The HP 1.00 reference rejects nonzero mapping selectors. Annex E uses Pt=0 and contains no C.3 case.

JS, Wasm GC and Native each passed seven fixed pairs at 1, 7 and 4096-byte chunks. CharLS Wasm 0.10.0 independently reconstructed indices for all seven, and pinned CharLS 3.0.0-dev cross-decoded all seven Native candidates. The public package passed a fresh three-backend install and C.3 API check. [Fixture hashes](../reports/m4-c3-20261130/abbreviated-images.json) · [Regressions](../reports/m4-c3-20261130/regressions.json) · [Mooncakes receipt](../reports/m4-c3-20261130/mooncakes-publication.json)

```sh
node sdk/build.mjs
node scripts/verify_abbreviated_images.mjs --native-exe _build/native/release/build/cmd/moonjls/moonjls.exe
```
