Fqix::IndexFormat
Constants
CHECKPOINT_META_SIZE = 25_u64
ENTRY_SIZE = 20_u64
EXACT_MAJOR = 2_u16
EXACT_MINOR = 3_u16
EXACT_VERSION = FormatVersion.new(EXACT_MAJOR, EXACT_MINOR)
HEADER_SIZE = V2_1_HEADER_SIZE
LEGACY_CHECKPOINT_META_SIZE = 21_u64
MAGIC = MAGIC_V2
MAGIC_V1 = "FQIX\u0001\u0000\u0000\u0000"
MAGIC_V2 = "FQIX\u0002\u0000\u0000\u0000"
MAX_ARRAY_SIZE = Int32::MAX.to_u64
MAX_COMPRESSED_WINDOW_SIZE = Zran::WINDOW_SIZE.to_u64 + 64_u64
MIN_NAME_ENTRY_SIZE = 26_u64
OVERFLOW_ENTRY_SIZE = 13_u64
SLOT_SIZE = 14_u64
SPARSE_MAJOR = 1_u16
Format kind = version major (matches the magic byte). Minor is the current revision within each kind; bump it when a kind's layout changes.
SPARSE_MINOR = 2_u16
SPARSE_VERSION = FormatVersion.new(SPARSE_MAJOR, SPARSE_MINOR)
V1_0_HEADER_SIZE = 80_u64
V1_HEADER_SIZE = 88_u64
V2_1_HEADER_SIZE = 112_u64
V2_2_HEADER_SIZE = 128_u64
V2_HEADER_SIZE = V2_1_HEADER_SIZE
VERSION = EXACT_VERSION
Instance methods
read(path : String) : Index
Sourceread_version(io : IO) : FormatVersion
The version field is two little-endian u16 values (major, minor). This is byte-compatible with the older single u32 version field.
write(index : Index, path : String) : Nil
Sourcewrite_version(io : IO, version : FormatVersion) : Nil
Source