Compact Binary Document Format

A binary replacement for HTML/CSS that reduces document size by up to 99%

Phase II Specification

Purpose: CBDF encodes rich documents (styled text, images, layouts) into compact binary, reducing bandwidth, storage, RAM, and CPU cycles.

Used in: QMail emails (.qmail), QWeb pages (.qweb), RAIDA data exchange

Example: A page layout that takes 200-2000 bytes in HTML/CSS takes 1 byte in CBDF.

Specification Documents

01 - Document Structure

5-section layout (Meta, Styles, Text, Resources, Logic), compression, meta-only documents

02 - Meta Section

Key/value envelope: subject, from/to, AI summary, preview text, semantic encoding

03 - Styles Section

11 style sub-tables with tiered records: text, containers, borders, nav bars, tables, images

04 - Text Section

UTF-8 text with binary control codes for styling, links, images, lists, and AI prompts

05 - Resources Section

Binary image/media blobs with 1-byte IDs, abortable downloads, progressive rendering

07 - Control Characters

All 32 ASCII control codes repurposed as CBDF commands with C enumerations

08 - Color System

R5G6B5 16-bit color encoding with 5 reserved transparency codes

09 - Font System

2-byte font IDs (4096 families), 16 standardized effects, custom font embedding

Document Structure

CBDF Document Structure