Expand description
Data section encoding and decoding for Paraglob v2
Provides full MMDB-compatible data encoding for storing pattern-associated data. Implements the complete MaxMind DB data type specification.
§Supported Types
Complete MMDB type support:
- Pointer: Reference to another data item (with base handling)
- String: UTF-8 text data
- Double: 64-bit floating point (IEEE 754)
- Bytes: Raw byte arrays
- Uint16: Unsigned 16-bit integers
- Uint32: Unsigned 32-bit integers
- Map: Key-value pairs (string keys)
- Int32: Signed 32-bit integers
- Uint64: Unsigned 64-bit integers
- Uint128: Unsigned 128-bit integers
- Array: Ordered lists of values
- Bool: Boolean values
- Float: 32-bit floating point (IEEE 754)
§Format
Uses MMDB encoding: control byte(s) followed by data. Control byte encodes type (3 bits) and size/payload (5 bits).
Structs§
- Data
Decoder - Data section decoder
- Data
Encoder - Data section encoder
- Data
Format Stats - Statistics from data format validation
- Data
Format Validation Result - Validation result for data format checks
- Pointer
Validation Result - Result of MMDB data section pointer validation
- Pointer
Validation Stats - Statistics from pointer validation
Enums§
- Data
Value - Data value that can be stored in the data section
- Pointer
Validation Error - Validation error types for MMDB data section pointer chains
Constants§
- MAX_
POINTER_ DEPTH - Maximum safe depth for pointer chains in MMDB data
- MAX_
TOTAL_ DEPTH - Maximum reasonable total nesting depth (arrays/maps + pointers)
Functions§
- validate_
data_ section - Validate data section structure by attempting to decode values
- validate_
data_ value_ pointers - Validate a data value and all pointers it contains
- validate_
data_ value_ utf8 - Validate UTF-8 in a decoded data value at the given offset
- validate_
value_ strings_ utf8 - Recursively validate UTF-8 in all strings within a DataValue