Skip to main content

Module physics_binary

Module physics_binary 

Source
Expand description

Custom binary format for physics field data.

Provides a compact binary representation with a fixed header, run-length encoding (RLE) for float sequences, CRC32 checksums, and integrity verification.

Structs§

BinaryHeader
Header for a binary physics field record.
RleRun
A run in the RLE encoding: (value, count).

Enums§

FieldDataType
Data type tag stored in the header.

Constants§

FORMAT_VERSION
Current format version.
MAGIC
Magic bytes that identify a physics binary field file.

Functions§

checksum_crc32
Compute a CRC32 checksum of the given byte slice.
compress_rle
Run-length encode a f64 slice.
decompress_rle
Decompress RLE runs back into a f64 Vec.
read_binary_field
Read and validate a binary field written by write_binary_field.
verify_integrity
Verify that data matches the expected checksum.
write_binary_field
Write a f64 field with a binary header.