2017-04-24 01:33:08 -07:00
# Chunks Disk Format
2017-04-28 05:17:53 -07:00
The 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.
2017-10-25 15:12:13 -07:00
Chunks in the files are referenced from the index by the in-file offset in the 4 LSB and the segment sequence number in the higher 4 MSBs.
2017-04-24 01:33:08 -07:00
```
2017-04-28 05:28:25 -07:00
┌────────────────────────────────────────┬──────────────────────┐
│ magic(0x85BD40DD) < 4 byte > │ version(1) < 1 byte > │
├────────────────────────────────────────┴──────────────────────┤
│ ┌───────────────┬───────────────────┬──────┬────────────────┐ │
│ │ len < uvarint > │ encoding < 1 byte > │ data │ CRC32 < 4 byte > │ │
│ └───────────────┴───────────────────┴──────┴────────────────┘ │
└───────────────────────────────────────────────────────────────┘
2017-04-24 01:33:08 -07:00
```