Notes/EByte

EByte Adds Repeating Blocks to Read Every WAV Chunk and Every ZIP Entry

EByte 0.2.0 adds the first feature from its approved plan after 0.1.1: repeating blocks. A schema can now say “read these fields again and again until the file ends”, or “until the next bytes stop matching this signature”, with no count stored anywhere. That covers a lot of real formats. The new riff-wave schema reads every chunk of a WAV file in whatever order it comes, and the new zip schema reads archives with any number of files. Both are in the schema library with real sample files that round-trip byte for byte on every change.

The case study ran the released binary on a WAV file with a title tag. The old fixed header schema stopped at offset 1644, where the metadata starts. The chunk schema read all three chunks, and three edits in the JSON (a new title, the metadata removed, the metadata moved before the audio) all played back in ffprobe and Python’s wave. The post is also plain about the limits: the RIFF size field is still edited by hand, which is the next release’s job, and a chunk with an odd size stops the schema at its pad byte.

An independent review found the look-ahead treating an unexpected end of input as a clean one; that and two smaller points were fixed before the release. Binaries for Linux, macOS and Windows are on the latest release, open source under Apache 2.0.