Skip to main content

Module utils

Module utils 

Source
Expand description

Shared scalar, buffer, compression, and error utilities. Utility surface matching utils.h.

Structs§

Buffer
Reusable reverse-growing word buffer used by ProtoCache encoders.
ReadError
Error returned when compressed input is malformed or incomplete.

Enums§

CorruptionKind
Broad reason that encoded or compressed input could not be read.

Traits§

Scalar
A fixed-width scalar that can be read from and written to little-endian words.

Functions§

compress
Compresses bytes using ProtoCache’s lightweight run encoding.
compress_into
Compresses into out, clearing its previous contents while reusing capacity.
decompress
Decompresses data produced by compress.
decompress_into
Decompresses into out, reusing its allocation.
load_file
Reads an entire file into memory.
word_size
Converts a byte length to the number of four-byte ProtoCache words.

Type Aliases§

Bytes
Borrowed raw bytes.
EnumValue
Numeric protobuf enum representation used by generated bindings.
Words
Borrowed encoded ProtoCache words.