Notes/EByte

EByte Imports Kaitai Struct Formats and Derives ZIP Entry Offsets

EByte 0.8.0 adds ebyte import-ksy, which turns a Kaitai Struct .ksy description into an EByte schema, so the format can be decoded to editable JSON and written back byte for byte. It only takes what a schema can say. Of the 191 files in the Kaitai gallery, 9 import, among them STL, MBR partition tables, utmp logs and the IVF container. The rest use computed positions, run-time type switches or expressions, and are refused with every reason listed instead of being half translated. The nine were checked value for value against the official Kaitai compiler and runtime on the same samples.

The same release derives the offset each ZIP central directory entry keeps for its file, so renaming or resizing an entry no longer means fixing offsets by hand. The case study imported STL, edited a cube made with numpy-stl, and renamed and edited a three-file ZIP that unzip -t then passed.

An independent review found two cases where an import would have read a file differently from Kaitai, both about where type and enum names are looked up, and a YAML reader that slowed badly on hostile input; all were fixed before the release. Everything is on the latest release, open source under Apache 2.0.