InitfinityTM
Initfinity / Docs / Binary Flow Format (FLOB)

Binary Flow Format (FLOB)

FLOB (Flow Binary) is Initfinity's compact binary format for flows. It combines standard CBOR encoding (RFC 8949) with deflate-raw compression to produce files significantly smaller than .flow JSON, with faster load times for large graphs. A .flob file represents a complete flow. It round-trips without loss to .flow; .fdl additionally leaves out the editor viewport, node catalog id and hosted flow link, which only .flow and .flob carry.

When to Use FLOB

SituationRecommended Format
Editing, version control, AI generation.fdl
Interop, sharing, debugging.flow
Large flows, storage efficiency, fast load.flob

FLOB is most beneficial for flows with many nodes and edges. For small flows the difference is negligible. Use whichever format is most convenient.

File Structure

Every .flob file has a 5-byte header followed by a compressed payload:

Offset  Size  Description
──────  ────  ───────────────────────────────────────
0       4     Magic bytes: "FLOB"
4       1     Format version (written: 2; readable: 1 and 2)
5       …     deflate-raw compressed CBOR payload

Saving as FLOB

In the save dialog, type your filename with a .flob extension:

my-flow.flob

Initfinity detects the extension and automatically encodes the flow as binary. If you type a name without a recognized extension, .flow is used as the default.

Loading FLOB

Click any .flob file in the File Explorer to load it onto the canvas (same as opening a .flow or .fdl file). The load terminal command also accepts .flob files directly:

load /my-flow.flob

Terminal Commands

The flob command in the terminal provides tools for converting and inspecting .flob files.

Convert a flow to FLOB

flob pack <input> [output.flob]

Accepts .flow, .fdl, or .json as input. If no output path is given, the file is written next to the input with a .flob extension.

flob pack /my-flow.flow
# → /my-flow.flob (68% smaller)

Convert a FLOB back to JSON

flob unpack <input.flob> [output.flow]

Decodes the binary file and writes a human-readable .flow JSON file. Useful for inspecting or sharing flows with tools that don't support FLOB.

flob unpack /my-flow.flob
# → /my-flow.flow

Inspect a FLOB file

flob info <input.flob>

Shows the file's header information and size without fully decoding it:

File:    /my-flow.flob
Magic:   FLOB
Version: 2
Total:   3.2 KB
Payload: 3.1 KB (compressed CBOR)

Size and Performance

FLOB applies two layers of compaction:

  1. CBOR: a standard binary encoding of the flow's JSON data
  2. deflate-raw: standard deflate compression via the native compression API (browsers, Node 18+ and Bun)

Repeated field names compress away in the deflate step, so version 2 files are about the same size as version 1 files.

In practice, small flows of 4 to 7 nodes come out around 60 to 70 percent smaller than the same .flow JSON; a 2.4 KB flow becomes about 0.8 KB. Exact ratios depend on content, and flows with long code blocks or embedded JSON data tend to compress well.

Version History

Version history and git commits work the same for .flob files as for .flow files. The text diff preview in the version panel is only available for .flow files, so binary files show the commit log there. To see what changed in a .flob file, use Compare with Earlier Version, which decodes both versions and works the same as for .flow.

Format Versioning

The version byte at offset 4 allows the format to evolve without breaking existing files.

VersionPayloadSupport
1CBOR using the cbor-x records extension, which only cbor-x can decodeRead only
2Plain CBOR that any decoder can readRead and written

Attempting to open a file with an unrecognized version byte produces an error rather than silently loading corrupt data. Because older app builds only know version 1, a file saved as version 2 does not open in them.

Limits

Decoders cap the input at 8 MiB and the decompressed payload at 32 MiB, so a small crafted file cannot expand into memory exhaustion. A payload that is truncated, is not CBOR, or does not contain a flow is rejected with an error. The decoded data is plain JSON, so unexpected types and keys such as __proto__ cannot change how the flow behaves.

Comparison to Other Formats

FormatHuman-readableAI-friendlyCompactFast parse
.flow (JSON)✓✓——
.fdl (FDL)✓✓✓—
.flob (FLOB)——✓✓✓✓

All three formats encode the same underlying flow data and can be converted between each other. Converting to .fdl drops the viewport, catalog id and hosted flow link.