Expand description
Byte buffer and character buffer nodes.
Two composition patterns from nosqlbench:
-
Direct hash fill: generate N bytes from a seed by chaining hashes. Fresh per cycle. Simple but slower for large buffers.
-
Image extraction: pre-fill a large static buffer at init time, then extract variable-length slices at cycle time using hash-based offset selection. Fast hot path — just a memcpy.
Structs§
- Byte
Image - A pre-filled byte image for fast cycle-time extraction.
- Byte
Image Extract - Extract a fixed-size byte slice from a pre-built image.
- Byte
Slice - Extract a sub-range from a byte buffer.
- Bytes
From Hash - Generate N deterministic bytes from a u64 seed via chained hashing.
Each 8-byte chunk is
hash(seed + chunk_index). Buffer is fresh per cycle. - Char
Image - A pre-filled character image for fast text extraction.
- Char
Image Extract - Extract a text slice from a pre-built character image.
- FromHex
- Decode a hexadecimal string to bytes.
- ToHex
- Encode bytes as lowercase hexadecimal string.
- U64To
Bytes - Convert a u64 to 8 bytes (little-endian).