Module generate_bytes

Source
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

§Internal Functions

Two primary internal functions handle byte generation:

  • [generate_group_bytes]: Creates a Vec<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

Enums§

GenerateBytesError
Errors that can occur while generating bytes from a schema for analysis