.fab is an open container format for digital books, developed by
Fabylon. It stores a book as typographic data — pages,
lines, indents, geometry and assets — rather than as web documents inside an
archive.
Every .fab file begins with the same sixteen bytes:
FABYLON_BOOK_02!
46 41 42 59 4C 4F 4E 5F 42 4F 4F 4B 5F 30 32 21
SPEC.md — the complete container specification: header, manifest fields, page records, asset table, identification signature and security considerations. Rendered version, with the same content: https://fabylon.net/fab/specification/
An EPUB is a ZIP of web documents, and every EPUB reader is a browser. That means the layout is reconstructed on the reading device, and the lines are broken by first-fit — the method typesetting abandoned after Knuth and Plass published optimal line breaking in 1981.
A .fab stores lines whose breaks were already decided by minimising the badness
of the whole paragraph, with the real embedded font metrics available. The
optimisation runs once, when the book is typeset, not on every device on every
reflow.
- Self-describing — metadata, layout defaults, typography and assets travel with the text.
- Random access — page records and assets are independently addressable chunks; page one is duplicated inside the manifest, so first paint does not depend on book length.
- Inspectable — a fixed header and Zstandard-compressed JSON. No scripting, no executable content, no proprietary reader required.
- Bounded — every compressed region declares its uncompressed length, so a decoder can allocate exactly and reject hostile input.
The measured typographic results, the metric they were measured with, and the command to reproduce them are at https://fabylon.net/fab/benchmarks/. The mathematics is at https://fabylon.net/fab/mathematics/.
A .fab does not embed PDF or EPUB fallback copies. An earlier version of
this README said it did; that was wrong. The container holds a manifest, a page
block and an asset arena. Fallback editions are published alongside the file — see
the downloads at https://fabylon.net/fab/.
It also carries no publication identity: hashes, signatures, prices, keys and storage addresses stay outside the file.
samples/ holds a complete .fab file for testing identification and
decoding. The specification paper itself is published in five languages, each as
PDF, EPUB and .fab, at https://fabylon.net/fab/.
| Role | Tool |
|---|---|
| Writer | Fabylon Bookmaker |
| Reader | Fabylon Reader |
Container version 0.2. The version is encoded in the magic string, so an
incompatible future generation will change the signature rather than a field
inside it. A previous generation, FABYLON_REALM_01, is still readable but is no
longer written.
No IANA media type is registered yet. application/vnd.fabylon.book is proposed.
Fabylon is an independent publisher and software maker in Karjalohja, Finland,
founded by the author M.H.H. Benders. It develops book-making software, the .fab
format, and publishes through Fabylon Press.
The specification is open and may be implemented freely. See https://fabylon.net/fab/ for terms.