|
FZGPUModules 2.0
GPU-accelerated modular compression pipelines
|
Compressed-Logarithm coding with a per-subchunk TCMS fallback — lossless byte-stream compressor. More...
#include "stage/stage.h"#include "fzm_format.h"#include "backend/types.h"#include <cstdint>#include <cstring>#include <stdexcept>#include <string>#include <unordered_map>#include <vector>Go to the source code of this file.
Classes | |
| class | fz::HCLOGStage |
Namespaces | |
| namespace | fz |
Compressed-Logarithm coding with a per-subchunk TCMS fallback — lossless byte-stream compressor.
Standalone port of the LC framework HCLOG component — the CLOG algorithm (see CLOGStage) plus one extra step per subchunk: HCLOG also tries reinterpreting every value in the subchunk via TCMS (the same two's-complement -> sign-magnitude / zigzag transform ZigzagStage uses) and picks whichever of the raw or TCMS'd values needs fewer bits, recording the choice as one flag bit per subchunk (32 bits total). This does better than plain CLOG on bipolar-looking data (e.g. already-negabinary/zigzag-shaped residuals) that would otherwise bit-pack poorly as raw unsigned magnitudes. Like CLOG, T must be unsigned (uint8/16/32/64 only) and there is no auxiliary bitmap or per-element full/dropped decision — every element in a subchunk is packed at the same fixed width (after the shared TCMS-or-not choice for that subchunk).
Output stream layout (identical container to RREStage/RZEStage):
Serialized header (9 bytes): [0..3] chunk_size (uint32_t LE), [4] word_size (uint8_t), [5..8] cached_orig_bytes (uint32_t LE).