Metadata handling module for adding metadata to compressed data in Gorilla compression.
This module handles the creation and serialization of metadata that describes the compressed data format, compression parameters, and other information needed for proper decompression.
The metadata format includes:
- Magic number for format identification
- Version information
- Compression parameters
- Data statistics
- Checksum for integrity verification
Summary
Functions
Adds metadata to packed data.
Extracts basic information from metadata header without full parsing.
Validates metadata header format.
Functions
Adds metadata to packed data.
Parameters
packed_data: Binary data to add metadata tometadata: Map containing metadata information from bit packing
Returns
- Binary data with metadata header prepended
Extracts basic information from metadata header without full parsing.
Parameters
binary: Binary data starting with metadata header
Returns
{:ok, info_map}with basic info, or{:error, reason}
Validates metadata header format.
Parameters
binary: Binary data that should start with metadata header
Returns
:okif valid,{:error, reason}if invalid