DagrDagrdraft

The guide

Binary formats, byte by byte

How programs write data down so that other programs can read it: numbers, text, records, graphs, streams and shared memory. Each chapter has panels you can push around, and where the bytes on the page are real, they were written by Dagr.

What this is

Dagr is one way of describing data, used for three different kinds of it, implemented in ten languages.

These are usually three technologies, with three ways of writing a schema and three sets of habits. In Dagr they share one schema language, one generator for the same languages, and one check that a change to a schema is safe. Graphs and sinks also share their rules for bytes and their tools for looking inside and comparing. Dagr is compact and it is fast to read, and other formats are too. What is unusual about it is the combination.

This guide explains the ideas such a format is built from, and then what Dagr does with them and why. You do not need to have looked inside a binary format before. If you can read a short Python function, you can read all of it.

It is a draft: all twenty chapters are written, and none has been through a second reader yet. Start at chapter 1, or go straight to what you came for.

Twenty chapters are a lot if you only want to know whether Dagr is for you. For that, read five: 1 for what it is, 5 for its layouts, 16 for how a schema changes, 18 for how fast it is and where it loses, and 20 for the tools. Add 12 if you came for streams and 15 if you came for shared memory.