FZGPUModules 1.0
GPU-accelerated modular compression pipeline
Loading...
Searching...
No Matches
fz::FZMHeaderCore Struct Reference

Fixed-size FZM file header core (80 bytes). More...

#include <fzm_format.h>

Public Member Functions

uint64_t computeHeaderSize () const
 

Public Attributes

uint32_t magic
 Must equal FZM_MAGIC (4B)
 
uint16_t version
 FZM_VERSION (2B)
 
uint16_t num_buffers
 Number of FZMBufferEntry records (2B)
 
uint64_t uncompressed_size
 Sum of all source uncompressed sizes in bytes (8B)
 
uint64_t compressed_size
 Total compressed payload size in bytes (8B)
 
uint64_t header_size
 Total header size; compressed payload starts at this offset (8B)
 
uint32_t num_stages
 Number of FZMStageInfo records (4B)
 
uint16_t num_sources
 Number of source (input) stages in the pipeline (2B)
 
uint16_t flags
 Feature flags: FZM_FLAG_* constants (2B)
 
uint64_t source_uncompressed_sizes [FZM_MAX_SOURCES]
 (32B)
 
uint32_t data_checksum
 CRC32 of compressed payload (v3.1+; 0 if flag not set) (4B)
 
uint32_t header_checksum
 CRC32 of header bytes (v3.1+; 0 if flag not set) (4B)
 

Detailed Description

Fixed-size FZM file header core (80 bytes).

Followed on disk by FZMStageInfo[num_stages] then FZMBufferEntry[num_buffers], then the compressed payload at byte offset header_size.

Checksums (v3.1+):

  • data_checksum: CRC32 (IEEE 802.3) of the compressed payload bytes.
  • header_checksum: CRC32 of the full header (core + stage array + buffer array) with header_checksum zeroed during computation. Both are 0 when the corresponding FZM_FLAG_HAS_* bit is not set in flags.

Member Function Documentation

◆ computeHeaderSize()

uint64_t fz::FZMHeaderCore::computeHeaderSize ( ) const
inline

Total header size in bytes (core + stage array + buffer array).

Member Data Documentation

◆ source_uncompressed_sizes

uint64_t fz::FZMHeaderCore::source_uncompressed_sizes[FZM_MAX_SOURCES]

(32B)

Per-source uncompressed sizes in forward topological source-discovery order (same order as the InputSpec vector passed to compress()). Indices 0..num_sources-1 are valid.