struct_data 0.1.0
struct_data: ^0.1.0 copied to clipboard
Bitwise operations, binary data manipulation, typed structs, and serialization utilities for Dart. Bit-level, byte-level, and word-level structured data with enum-keyed maps and binary codecs. Lightwe [...]
0.1.0 #
- Initial public release.
- Bits: Bitwise operations on integers via
Bitsextension type, withBitmaskfor field extraction and modification. - Word: Register-width variable with byte/string constructors and endian-aware serialization.
- BitStruct / BitField: Named bit-field access within a single integer, supporting both mutable and immutable variants.
- ByteStruct / ByteField: Keyed access to typed fields within
TypedDatabuffers usingdart:ffinative type markers. - WordStruct / WordField: Byte-aligned fields within a 64-bit word, with immutable copy helpers.
- EnumMap / IndexMap: Type-safe, fixed-key maps with parallel array backing and built-in JSON serialization.
- Serializable mixin: Declarative field schema via enum keys providing
toMap(),toJson(), value equality, and immutable copies. - BinaryFormat / BinaryCodec: Encode/decode between typed views and raw binary integers, including fixed-point, boolean, sign, and enum formats.
- BitsMap / BoolMap: Flag and boolean collections backed by a single integer.
- Packet framework: Abstract packet structure with header parsing, CRC/checksum validation, payload build/parse, and
PacketTransformerfor stream-based framing. - Version model: 4-field version number backed by
WordStructwith string/JSON serialization. - Utility extensions:
NumLimits,LinearConversion,Sliceable,TypeKey, null-safe helpers, and typed data slicing. - TypedDataBuffer: Fixed-size
BytesBuilderwith persistent buffer for packet assembly.