Physical v1 segment container. See the Phase 2 segment RFC for the byte contract.
Checksums, framing, and sequence continuity establish physical integrity only. No result authorizes repair, semantic replay, or an applied checkpoint.
Summary
Functions
Validates a complete in-memory segment without retaining its records.
Physical reduction; accumulator is returned only on complete success.
Halt-aware physical traversal; errors never return a successful prefix accumulator.
Validates a segment through bounded positional reads. No writes occur.
Functions
@spec decode_store(any()) :: false | <<_::64, _::_*8>> | {:error, :checksum | :invalid_argument | :invalid_magic | :invalid_store_id | :reserved_bytes | :trailing_store_bytes | {:invalid_version, 0} | {:unsupported_flags, byte()} | {:unsupported_version, byte()}} | {:incomplete, 28 | 44 | 64} | {:ok, <<_::128>>}
@spec encode_header(any()) :: {:error, :invalid_argument | :invalid_first_sequence | :invalid_segment_id | :invalid_store_id} | {:ok, <<_::32, _::_*8>>}
@spec encode_store(any()) :: {:error, :invalid_store_id} | {:ok, <<_::32, _::_*8>>}
@spec filename(any()) :: {:error, :invalid_segment_id} | {:ok, <<_::32, _::_*8>>}
@spec max_bytes() :: 1_073_741_824
@spec max_count() :: 38_347_918
@spec max_id() :: 18_446_744_073_709_551_615
@spec min_rotation_bytes() :: 16_777_352
Validates a complete in-memory segment without retaining its records.
Physical reduction; accumulator is returned only on complete success.
Halt-aware physical traversal; errors never return a successful prefix accumulator.
Validates a segment through bounded positional reads. No writes occur.