Expand description
Generates byte streams from schema-defined field groups for compression analysis.
This module handles the core functionality of converting schema field group definitions into analyzable byte streams. It provides specialized handling for different group component types and manages bit-level operations for field transformations.
§Core Types
GenerateBytesError
: Comprehensive error handling for byte generationGenerateBytesResult
: Type alias for Result with GenerateBytesError
§Internal Functions
Two primary internal functions handle byte generation:
- [
generate_group_bytes
]: Creates aVec<u8>
from group components - [
generate_output_for_compare_groups_entry
]: Writes directly to a provided bitstream
§Component Types
The module handles two primary component types:
- Arrays: Sequential field values with optional bit slicing
- Structs: Grouped fields with padding and alignment
§Error Handling
Comprehensive error handling covers:
- Field lookup failures
- Bit alignment issues
- Read/write operations
- Invalid component configurations
§Implementation Notes
- Handles both MSB and LSB bit ordering
- Supports partial field reads via offset/bits
§Submodules
write_array
: Array component processingwrite_struct
: Struct component processing
Enums§
- Generate
Bytes Error - Errors that can occur while generating bytes from a schema for analysis