FZGPUModules 1.0
GPU-accelerated modular compression pipeline
Loading...
Searching...
No Matches
fzm_format.h File Reference

FZM binary file format definitions — structs, enums, and helpers. More...

#include <cstdint>
#include <cstring>
#include <stdexcept>
#include <string>

Go to the source code of this file.

Classes

struct  fz::FZMStageInfo
 Per-stage metadata record written into the FZM header (256 bytes). More...
 
struct  fz::FZMBufferEntry
 Per-buffer metadata record written into the FZM header (256 bytes). More...
 
struct  fz::FZMHeaderCore
 Fixed-size FZM file header core (80 bytes). More...
 

Namespaces

namespace  fz
 

Enumerations

enum class  fz::StageType : uint16_t {
}
 Stage type identifiers written into the FZM header. More...
 
enum class  fz::DataType : uint8_t { }
 Element data type identifiers used in buffer and stage descriptors. More...
 

Functions

constexpr uint8_t fz::fzmVersionMajor (uint16_t v)
 
constexpr uint8_t fz::fzmVersionMinor (uint16_t v)
 
size_t fz::getDataTypeSize (DataType type)
 
std::string fz::dataTypeToString (DataType type)
 
std::string fz::stageTypeToString (StageType type)
 

Variables

constexpr uint32_t fz::FZM_MAGIC = 0x464D5A32
 
constexpr uint8_t fz::FZM_VERSION_MAJOR = 3
 
constexpr size_t fz::FZM_LEGACY_HEADER_CORE_SIZE = 72
 
constexpr uint16_t fz::FZM_FLAG_HAS_DATA_CHECKSUM = 0x0001u
 data_checksum field is valid
 
constexpr uint16_t fz::FZM_FLAG_HAS_HEADER_CHECKSUM = 0x0002u
 header_checksum field is valid
 
constexpr size_t fz::FZM_MAX_BUFFERS = 32
 Maximum pipeline output buffers per file.
 
constexpr size_t fz::FZM_MAX_NAME_LEN = 64
 Maximum output port name length (bytes, null-terminated)
 
constexpr size_t fz::FZM_STAGE_CONFIG_SIZE = 128
 Per-stage serialized config slot (bytes)
 
constexpr size_t fz::FZM_MAX_SOURCES = 4
 Maximum source stages per pipeline.
 

Detailed Description

FZM binary file format definitions — structs, enums, and helpers.

On-disk layout:

[FZMHeaderCore] (80 bytes)
[FZMStageInfo × num_stages] (256 × num_stages bytes)
[FZMBufferEntry × num_buffers] (256 × num_buffers bytes)
[compressed data payload] (compressed_size bytes)

Version history:

  • v3.0: initial versioned format (FZMHeaderCore = 72 bytes)
  • v3.1: added flags, data_checksum, header_checksum (FZMHeaderCore = 80 bytes)