Skip to main content

PACKED_LEN

Constant PACKED_LEN 

Source
pub const PACKED_LEN: usize = 33;
Expand description

The five facts of one object, packed little-endian into PACKED_LEN bytes.

  0  u64 LE  offset               8
  8  u64 LE  len                  8
 16  u8      object type code     1
 17  u64 LE  uncompressed_size    8
 25  u64 LE  delta_base           8
                                 ══
                                 33

Fixed order, fixed width, no padding, no nulls. The type byte sits between the extent and the sizes rather than after them so the record is 33 bytes instead of 40 — the whole point of the arm is how few bytes a full-row fetch drags through cache, and 33 against 40 is 18% of that budget.

This was 25 bytes before delta_base (PLAN §13) joined the schema. The column is appended rather than inserted so the first four fields keep the offsets every reader here and every hand-decode in the tests already uses; the width is asserted byte for byte by the_packed_record_is_the_documented_33_bytes.