Softanza
StartFrançais
Softanza
I/O, formats, extensibility, media

Binary formats

A plan of record and zero shipped code; rated on the substrate and the BN0 to BN5 roadmap.

0 Strong · 0 Solid · 1 Partial · 9 Emerging

Measured against: Kaitai Struct · construct · 010 Editor · Folders: base/binary(opens in a new tab) · For programmers: this area's reference

the plan of the binary plane, drawn by hand on a real file: 33 bytes and the eleven fields they hold
the plan of the binary plane, drawn by hand on a real file: 33 bytes and the eleven fields they hold. drawn on 2026-10-16 by the site's script tools/areas-figurative.ring, run inside the library at commit 4a184e6f0; the binary plane itself has no code yet · the source(opens in a new tab)

Rethought from first principles

What Softanza kept from what works, and what it rethought, as the library wrote it down in its design documents and narrations.

The Softanza wayA binary file is a table the bytes forgot to show: write its layout down once, as data, and the bytes become rows and columns.

Kept from the best practice

  • A layout is declared as data, not written as parsing code. Kaitai Struct and COBOL copybooks showed this works; a copybook becomes one input format among others. source(opens in a new tab)
  • The COBOL picture rules are adopted, done right: text, binary, zoned and packed decimal, with scale and sign. source(opens in a new tab)
  • The classic hex view is kept: offset, hexadecimal bytes and readable text side by side, now with each field's span named. source(opens in a new tab)

Rethought

  • A decoded file lands as a live table, where summaries, statistics, plots and export already wait, so exploring it takes zero extra steps. (planned) source(opens in a new tab)
  • The same schema also writes files. A crafter narrates each field and its bytes, teaching layout to beginners and producing test files. (planned) source(opens in a new tab)
  • Damaged records return verdicts, never crashes, because an old file will contain garbage and a tool that stops at the first bad record is useless. (planned) source(opens in a new tab)
  • Schemas are declared, never guessed from the bytes. Format inference is refused as a different, research-grade product. (planned) source(opens in a new tab)

The one pilot page that rates a plan, not a product: the binary plane is 607 lines of design and zero shipped code -- no classes, no decode engine, no tests, no phase has run. The bet is to treat a binary file as 'a table the bytes forgot to show', decoded in one engine crossing into the stzTable analysis stack that already exists, with zero new DLLs; the substrate is real, everything above it is named, sequenced (BN0-BN5) and unbuilt.

What a crafter does with it, and what stands out

  • A declarative data schema decoded in one engine crossing, not a generated parser (vs Kaitai's compiler model)
  • Decoded bytes land in stzTable, the same analysis stack as every other Softanza source
  • Round-trip: the same schema vocabulary reads and writes, which most binary parsers cannot do
  • Zero new DLLs: extend the stz_bytes engine rather than vendor Kaitai

What is owed

  • Repair the byte-bridge truncation (fixed [4096]/[8192] return buffers)
  • The schema + decode-records engine (BN1)
  • Endian readers + EBCDIC CP037, then wire decode into stzTable
  • COBOL copybook compiler (BN2), tied to the RINGBOL commercial gate

No example run on this page. This group is a plan of record with no shipped code; there is nothing to run, and the page says so rather than showing an example from elsewhere.

The lanes, one by one

Lanes and their notes are quoted as they were read at the source, on Read from the source on 2026-09-16 -- base/binary holds one file, SOFTANZA_BINARY_PLAN.md (607 lines, 2026-08-16); no test/binary exists.

Byte-buffer & encoding substrate
Partial
stzBytes over an engine handle buffer plus hex/base64/crc32; the bridge silently truncates slices above 4096/8192 bytes and has no typed endian readersengine bytes.zig / bridge_bytes.zig, string/encode.zig
Schema-driven decode engine
Emerging
stzBinarySchema (pure-Haro data, never code) consumed by a planned stz_bytes_decode_records that decodes the whole file in one crossing; no code (BN1)SOFTANZA_BINARY_PLAN.md (BN1)
Endian-aware scalar types
Emerging
Planned :U8..:U64, :I8..:I64, :F32/:F64 in both endiannesses; the engine has only stz_bits_byte_swap, no readInt or endian-aware scalar decodeengine bits.zig (byte_swap)
Text & legacy character encodings
Emerging
UTF-8 is codepoint-correct today, but the EBCDIC CP037 / CP500 / CP1140 translation tables the plan targets do not exist
Numeric encodings -- packed & zoned decimal
Emerging
Planned :PackedDecimal (COMP-3) and :Zoned (overpunch) decode, the numeric heart of COBOL data; no code, no primitive
COBOL copybook dialect
Emerging
Planned stzCopybook compiling a copybook into a stzBinarySchema (BN2); two fossils exist and the plan disavows bothfossils max/stzBinaryFile and future/stzCobol (disavowed)
Composite structure & framing
Emerging
Planned flat fields + :occurs first, then :variants (REDEFINES), RDW variable-length records and Fortran framing; nothing built, staged to v2 (BN4)
Decode-to-table & analysis pipeline
Emerging
The destination (stzTable with stats, Tukey, plots, CSV/JSON, SQLite) is real; the pipe into it does not exist because nothing decodes yet
Binary writing & fixture generation
Emerging
Planned stzBinaryFileMaker + Narrate() and stz_bytes_encode_records (BN3) so a read schema also writes; no code
Hex view, exploration & big files
Emerging
Planned HexView(), DecodeReport(), Explore() and streaming (BN4); file I/O today is whole-file only via stz_file_read, no seek/chunkengine file.zig (whole-file read)