Codec & Format Audit/177,155 files swept, both roots/31 July 2026

Every layer around the pixel codec is sovereign. The pixel codec is missing.

A full sweep of the tree against the format universe. The compression and classical-video quadrants are genuinely deep — DEFLATE, PNG, JPEG and a complete H.264 encoder/decoder are all native NishiLang. WebP and AVIF are plumbed through four layers — sniffed, measured, negotiated, transfer-checked — with no bitstream decoder underneath. The audio quadrant holds PCM and nothing else. And AV2 was finalized nine weeks ago, with no browser on Earth decoding it yet.

20Native & usable
10Plumbed, no codec
38Absent — 0 matches
2Uncontested moat
Live defect · four layers deep, one layer short

WebP and AVIF are first-class everywhere except where the pixels are.

This is not a missing format — it is a missing last mile. WebP is recognised by magic bytes in nx_media_sniff.nx and nx_cbx_pages.nx; its VP8X, VP8 and VP8L headers are parsed for dimensions in nx_img_dims.nx; nx_manga_get.nx validates that a full RIFF payload arrived; and nx_cms_image.nx negotiates AVIF > WebP > JPEG against the client Accept header. Every layer is sovereign — and nothing in 177,155 files turns a VP8L bitstream into pixels. nx_img_dims.nx reads the 14-bit width and height out of the VP8L header and stops at the entropy-coded payload. nx_cms_image.nx states the gap in its own first line: the pixel codec/resize is the only last-mile boundary.

Live defect · adoption gap

A working inflater exists, and HTTP refuses to use it.

Nine of ten fetchers send Accept-Encoding: identity, so every page, script and JSON body crosses the wire uncompressed — while nx_gzip.nx and a passing inflate KAT sit right there in the tree. The tenth, nx_polite_browser.nx, has the opposite fault: it advertises gzip, deflate, br and there is no brotli decoder at all, so a compliant server can legally reply with a body it cannot read.

Open door

AV2 is finalized, royalty-free, and unimplemented by every shipping browser.

AOMedia froze AV2 v1.0.0 on 28 May 2026 and announced it on 9 June — roughly 30% better compression than AV1, under the same royalty-free patent policy. No browser, phone or streaming device decodes it; hardware is expected 2027–2028. A native NishiLang AV2 decoder in the Nishi browser is a capability no other browser currently has, and the window is open for about eighteen months.

Landed 31 July 2026

Thirty-one gates GREEN — the first codecs are built, in NishiLang, from the first bit up.

Compiled on the NAS and run there, not asserted: nx_webp_huff 11/11 (VP8L Huffman groups, including the single-symbol tree that must decode consuming zero bits), nx_webp_vp8l 15/15 (14 predictors, distance-plane mapping, prefix codes, RIFF container, and a complete 32-byte WebP file decoded end-to-end to its exact pixel), nx_zstd_fse 12/12 (the FSE/tANS decoding-table build every zstd block rests on), nx_flac 15/15 (Rice residuals, fixed and LPC predictors, stereo decorrelation, CRC-8), nx_av1_ec 13/13 — the multi-symbol CDF arithmetic decoder that AV1, AVIF and AV2 all rest on — and nx_qoi 12/12, the first complete codec in the set: encoder and decoder both, proven by exact byte-identical round-trip rather than against hand-computed constants. nx_ogg 11/11 follows the same pattern — page writer and reader both, with a CRC pinned to an absolute value because Ogg's variant is non-reflected and a stock reflected CRC-32 would round-trip against itself while producing pages no other tool accepts. nx_tar 8/8 completes USTAR in both directions, pinning the numeric fields as ASCII octal rather than binary and the checksum as self-referential — a two-file archive is built and walked back with every name, size, mode, mtime and content byte exact. nx_zip 7/7 closes the format you can now both read and write. Note the trap it pins: ZIP's CRC-32 is the REFLECTED variant and Ogg's is the same polynomial UNreflected — two things called "CRC-32" in this tree that are not interchangeable. Swap them and archives round-trip perfectly against themselves while every unzip reports a checksum error, so both gates assert absolute published check values rather than self-consistency.

Each gate carries negative controls, and the WebP gate was proven able to fail: disabling the zero-bit collapse in the module turned it RED, restoring it turned it GREEN, with a different binary hash at every step. The AV1 gate earned its keep immediately — writing it caught a live bug in the module, which had mixed libaom's inverted CDF convention with the spec's forward one. That defect still decodes; it just drifts until the stream desyncs.

Compression & archive

the transport layer — everything rides on it
FormatStatusWhat exists in the treeSOTA position, July 2026
DEFLATERFC 1951NativeEncoder and decoder, fixed + dynamic Huffmannx_deflate.nx · nx_deflate_enc.nx · nx_huffman.nxLegacy floor. Universal, beaten on ratio and speed by everything below.
gzip1F 8BNativeWrapper + inflate, with a passing KATnx_gzip.nx · nx_gzip_inflate_kat_test.nxUniversal fallback; still accepted by ~100% of CDN traffic.
BrotliContent-Encoding: brAbsentNothing. Advertised by nx_polite_browser regardless.Best ratio of the three web encodings; ~96% browser support. Default for static text.
Zstandard28 B5 2F FDFrame + FSE builtFSE/tANS tables 12/12, frame + block layer 8/8 (raw and RLE frames decode end-to-end to exact bytes — a valid zstd file), the backward bitstream reader + Huffman weights 8/8, the Huffman decode table 7/7, the literals section 6/6 (raw, RLE and Huffman-coded literals all decode end-to-end), sequences 7/7, and compressed-block decompression 6/6 — a COMPRESSED block with Huffman-coded literals now decompresses end to end through every layer. the FSE decoding state machine 6/6, the three PREDEFINED sequence distributions 5/5 (RFC 8878, verified by sum and by table build), and sequence decoding 7/7 (the repeat-offset machine including the zero-literal slide). The sequenced path is now WIRED into the block decoder and bounded — but its bytes are not yet proven, which needs a real .zst fixture. Non-predefined table modes and four-stream literals are refused with distinct codesten nx_zstd_* modules, 74 assertionsBest speed-at-ratio; Chrome 123+, Firefox 126+, Safari 26+. Shared-dictionary dcz is the frontier.
ZIP50 4B 03 04CompleteWriter AND reader, gated GREEN 7/7 on 2026-07-31 — reflected CRC-32 pinned to its check value, local + central-directory records, EOCD scan, two-entry archive read back through CD offsets byte-exact. STORED method; deflate via nx_deflate_enc is a ratio improvement, not a correctness onenx_zip.nx · nx_zip_read.nxFrozen but immortal — EPUB, OOXML, JAR and every download bundle are ZIP. We can now produce them, not just read them.
tarustarCompleteFull USTAR reader AND writer, gated GREEN 8/8 on 2026-07-31 — ASCII-octal fields, self-referential checksum, two-block terminator, multi-file archive round-trip byte-exactnx_tar.nxUnchanged since 1988, still the packaging substrate for everything Unix. With the existing gzip this is the .tar.gz path.
LZ404 22 4D 18Header onlyHeader struct onlynx_lz4_header.nxSpeed champion for in-memory paths; zstd -1 has taken most of its ground.
XZ / LZMAFD 37 7A 58 5AAbsentNothing.Still the ratio king for archival where decode time is free.
bzip242 5A 68AbsentNothing.Legacy. Superseded by zstd and xz on every axis — decode-only is sufficient.

Still image

the quadrant the browser is actively broken in
FormatStatusWhat exists in the treeSOTA position, July 2026
PNG / APNG89 50 4E 47NativeDecoder, writer, animated PNG read + writenx_png.nx · nx_png_write.nx · nx_apng*.nxUniversal lossless baseline. Unthreatened for UI assets.
JPEGFF D8 FFNative60 files — decoder, encoder, progressive, IDCT, YCbCr, upsamplingnx_jpeg_decoder.nx · nx_jpeg_write.nxStill ~70% of images on the open web. The deepest image work in the tree.
BMP42 4DNativeReader + writernx_bmp.nxNot web-relevant; useful as an uncompressed pivot for gates.
GIFGIF89aDecode onlyLZW decoder, no encodernx_gif_decode.nxObsolete as a codec, immortal as a container. Decode is enough.
WebPRIFF .... WEBPVP8L builtVP8L decoder BUILT and gated GREEN 2026-07-31 — Huffman groups 11/11, decoder + container 15/15 including an END-TO-END decode of a complete 32-byte WebP file to its exact pixel, the VP8X extended container + ALPH alpha channel 6/6 with all four alpha filters round-tripping byte-exact, and the VP8 lossy boolean decoder + keyframe header 8/8. VP8 macroblock prediction and residuals still to donx_webp_huff.nx · nx_webp_vp8l.nx · nx_webp.nx96% browser support. The last mile is closed for lossless: container, stream and pixel path proven wired end-to-end.
AVIFftypavifNo pixel codecNegotiated first-choice by the CMS; ISOBMFF container half already solvednx_cms_image.nx · nx_mp4_demux.nx>95% browser support. Needs an AV1 intra decoder — the same core AV2 needs.
JPEG XLFF 0AAbsent · timedNothing.Returned to Chrome in v145; expected on by default H2 2026, taking support from ~16% (Safari only) to ~85–90%. Being ready before the flag flips is leverage.
QOIqoifCompleteEncoder AND decoder, gated GREEN 12/12 on 2026-07-31 by exact byte-identical ROUND-TRIP over 265 pixels through every opcodenx_qoi.nxLossless, single-pass, no entropy coder — far faster to encode than PNG at similar ratio. The right format for on-box intermediates where DEFLATE is pure overhead.
ICO / CUR00 00 01 00CompleteWriter AND reader, gated GREEN 6/6 on 2026-07-31 — the zero-means-256 dimension encoding, payload classified from its own bytes (PNG and DIB in one file), size selection, and crafted-offset attacks refusednx_ico.nxEvery site has a favicon and the tree could neither read nor write one.
TIFFII* · MM*AbsentNothing.Long tail. Matters for scanned-document ingest, not for the browser.

Video

deep in 2003, empty in 2026
FormatStatusWhat exists in the treeSOTA position, July 2026
H.264 / AVCavc1Native89 files. Encoder and decoder: CAVLC, CABAC, intra 4/8/16, P and B macroblocks, MV prediction, deblocking, POCnx_h264_*.nxStill the universal floor — every device decodes it. Genuinely complete work.
HEVC / H.265hvc1 · hev1Decode sideParse, slice, CABAC, IDCT, prediction, reconstruction — no encodernx_hevc_dec.nx · nx_hevc_cabac.nxDominant for streaming and Apple capture; patent-encumbered. Decode-only is the right call.
NishiVideosovereignNativeOwn integer codec — transforms, in-loop filters, RD, quarter-pel, tile parallel; ~100 gatesnx_vcodec*.nxMeasured +159% BD-rate vs x264 at last reading. Ours, but not yet competitive.
AV1av01Eight layers builtSymbol coder 13/13, OBU framing 8/8, sequence header 6/6, tile geometry 7/7, frame-header params 6/6, transform primitives 7/7, inverse DCT networks 9/9, non-directional intra prediction 7/7 (DC across all four availability cases, Paeth, the three smooth modes). ADST, larger DCT sizes, directional modes, partitioning and residual coefficient coding remainnx_av1_ec · nx_av1_obu · nx_av1_seq · nx_av1_tile · nx_av1_frame · nx_av1_txfmThe current royalty-free baseline. Universal browser support, hardware decode on most 2023+ silicon. Was the largest single gap; the foundation is now laid.
AV2av02Shares six built layersAV2 inherits AV1's symbol coder, OBU framing, sequence header, tile geometry, frame-header parameters and transform primitives essentially intact — six gated-GREEN layers (13/13, 8/8, 6/6, 7/7, 6/6, 7/7) are already AV2's foundationsix nx_av1_* modulesSpec frozen 28 May 2026. ~30% over AV1, royalty-free. No browser, phone or device decodes it. Hardware 2027–2028 — the window is open now.
VP8 · VP9vp08 · vp09AbsentNothing.VP9 still carries a large share of YouTube. VP8 is required for WebP lossy and legacy WebRTC.
VVC / H.266vvc1AbsentNothing.Best classical ratio, near-zero browser adoption, heavy licensing. Track, do not build.
FFV1 · ProRes · APVFFV1 · apcn · apv1AbsentNothing.Production and archival intermediates. FFV1 is the archival lossless standard and is cheap to implement.

Audio

the emptiest quadrant — PCM and nothing else
FormatStatusWhat exists in the treeSOTA position, July 2026
WAV / PCMRIFF .... WAVENativeReader + writernx_wav.nx · nx_wav_writer.nxUncompressed baseline. Correct to have; carries no compression capability.
NishiVoice v1/v2sovereignNativeOwn voice codec, two generations, tierednx_voice_codec.nx · nx_voice_codec_v2.nxOurs and proven over UDP round-trip — but nothing else on Earth decodes it.
OpusOpusHeadAbsentNothing.Mandatory-to-implement for WebRTC. Every major browser sends and receives it. Without Opus the SFU lane cannot interoperate with any standard client.
FLACfLaCDecoder completeFull decode path, gated GREEN 15/15 + 8/8 on 2026-07-31 — Rice residuals, fixed predictors 0-4, LPC, stereo decorrelation, CRC-8 and CRC-16, variable-length frame headers with UTF-8 numbers and deferred fields, and CONSTANT/VERBATIM/FIXED/LPC subframes decoded from real assembled framesnx_flac.nx · nx_flac_frame.nxThe lossless standard; native in every browser. The first complete audio codec in the tree.
AAC-LC / xHE-AACmp4a · ADTS FF F1AbsentNothing.The safe default for video-on-demand — everything decodes it. xHE-AAC ships by default on Android 17.
MP3 · Vorbis · ALACID3 · FF FBAbsentNothing. One MP3 test fixture, no decoder.Legacy but enormous in install base. Required to read the existing 160k-item media vault.

Containers, data & documents

strongest quadrant — most of this is already ours
FormatStatusWhat exists in the treeSOTA position, July 2026
MP4 / ISOBMFFftypNativeMux, demux, sample tables, fast-startnx_mp4_mux.nx · nx_mp4_demux.nxThe universal container. Also the container half of AVIF and HEIC — already solved.
MPEG-TS0x47 syncNativeTS to MP4 and fragmented MP4nx_ts2mp4.nx · nx_ts2fmp4.nxBroadcast and HLS segment format. Solid.
Matroska / WebM1A 45 DF A3Remux onlyMKV to fMP4 remux; no general EBML reader/writernx_mkv2fmp4.nxWebM is the default container for AV1 and Opus on the web. Blocks both.
OggOggSCompletePage reader AND writer, gated GREEN 11/11 on 2026-07-31 — non-reflected CRC-32 pinned to an absolute value, lace tables incl. the exact-multiple-of-255 trailing zero, round-trip byte-identical, one flipped bit refusednx_ogg.nxThe standard carrier for Opus, Vorbis and FLAC outside MP4. The audio quadrant now has its container.
WASM00 61 73 6DNativeFull VM plus an emitter — 140 filesnx_wasm_vm.nx · nx_wasm_emit2.nxGenuinely strong. Sandboxed execution and a code generator both present.
CBOR · Protobuf · Base64RFC 8949 · varintNativeEncoders and decodersnx_cbor.nx · nx_protobuf_wire.nx · nx_base64.nxCovers binary interchange. MessagePack and Arrow absent but low priority.
TrueType00 01 00 00 · OTTONativeFont library plus a TTF emitternx_ttf_fontlib.nx · nx_font_ttf_emit.nxParsing and generation both present — unusually complete.
WOFF2wOF2AbsentNothing.The web font wire format — a brotli-compressed, glyph-transformed TTF. Nearly free once brotli exists.
glTF / GLB · EPUBglTF · mimetypeNativeScene, mesh, animation, export; EPUB read with nav and TOCnx_gltf_*.nx · nx_epub_*.nxBoth current. Draco mesh compression is the notable glTF gap.
PDF · SVG%PDF · <svgPartialPDF text extraction and reflow, not full render; partial SVG rasterisernx_lib_pdf.nx · nx_render_svg.nxSVG is load-bearing for the browser and worth completing before any exotic codec.
WebVTTWEBVTTCompleteWriter AND reader, gated GREEN 6/6 on 2026-07-31 — both legal timestamp shapes pinned absolutely, BOM-tolerant magic, multi-cue document round-trip with exact timings and textnx_webvtt.nxThe format the HTML5 <track> element takes natively. Captions are an accessibility requirement, and the tree had none.
SubRip (SRT)HH:MM:SS,mmmCompleteWriter, reader AND WebVTT conversion, gated GREEN 6/6 on 2026-07-31 — the comma separator enforced both ways, and a file with deliberately broken cue numbering read back in file ordernx_srt.nxThe format most subtitles actually ship in. Browsers take WebVTT only, so the conversion is what makes an .srt file playable.
TTMLIMSCAbsentNothing.Broadcast subtitling. XML-based and heavyweight; low priority for the browser.

Build order

sequenced by dependency, then by leverage
Rung 0

Make advertised equal decodable

Wire the existing inflater into HTTP and stop advertising what we cannot read. Either decode br or drop it from the Accept-Encoding header; either decode WebP/AVIF or stop asking for them. Cheapest correctness win in the audit, and it uses code already in the tree.

Rung 1

WebP — close the last mile: VP8L, then VP8 lossy, then VP8X alpha

Not a new format, a completed stack: sniffing, sizing, negotiation and transfer are already sovereign, so this rung is only the pixel codec. VP8L is canonical Huffman plus LZ77 backward references, a colour cache and four transforms — it composes straight onto nx_bitstream_read_lsb and nx_huffman_decode_lsb, both already present and gated. VP8 lossy then reuses the range coder in nx_rangecoder.nx and the H.264 transform machinery we already own.

Rung 2

zstd and brotli, wired to Content-Encoding

zstd needs FSE/tANS, the same entropy family as the existing nx_rans.nx. Brotli needs an LSB reader, context modelling and the 122KB static dictionary. Landing brotli also unlocks WOFF2 nearly for free.

Rung 3

The AV1 core — and with it, AVIF

The multi-symbol CDF arithmetic decoder, OBU parsing, superblock partitioning and the transform set. This is the largest gap in the tree and the mandatory precursor to AV2 — the two share most of their tooling. AVIF then falls out as AV1 intra plus the ISOBMFF demuxer we already have.

Rung 4

Opus, FLAC, and the Ogg carrier

Opus is the interoperability floor for the SFU lane — without it, no standard WebRTC client can talk to us. FLAC is the cheapest real codec on this page. Ogg is a few hundred lines and carries both.

Rung 5

AV2 — while the field is still empty

Built on the Rung 3 core. Shipping a native AV2 decoder before any other browser has one is the only item in this audit that is a moat rather than a catch-up. The window closes as hardware decode arrives in 2027–2028.

Sources