1# Chunks Disk Format
2
3The following describes the format of a single chunks file, which is created in the `chunks/` directory of a block. The maximum size per segment file is 512MiB.
4
5Chunks in the files are referenced from the index by uint64 composed of in-file offset (lower 4 bytes) and segment sequence number (upper 4 bytes).
6
7```
8┌────────────────────────────────────────┬──────────────────────┐
9│ magic(0x85BD40DD) <4 byte>             │ version(1) <1 byte>  │
10├────────────────────────────────────────┴──────────────────────┤
11│ ┌───────────────┬───────────────────┬──────┬────────────────┐ │
12│ │ len <uvarint> │ encoding <1 byte> │ data │ CRC32 <4 byte> │ │
13│ └───────────────┴───────────────────┴──────┴────────────────┘ │
14└───────────────────────────────────────────────────────────────┘
15```
16