Struct HunkProgress
Per-hunk progress information reported by ChdEncoder via HunkCompleted, useful for compression-ratio logging. Callbacks fire once per hunk, in hunk order, after the hunk has been compressed.
public readonly struct HunkProgress
- Inherited Members
Constructors
HunkProgress(uint, uint, int, int, byte, string, double)
Initializes a new HunkProgress report for one compressed hunk.
public HunkProgress(uint hunkIndex, uint hunkCount, int rawBytes, int storedBytes, byte compressionType, string codecName, double ratio)
Parameters
hunkIndexuintThe zero-based index of the hunk being reported.
hunkCountuintThe total number of hunks in the image.
rawBytesintThe uncompressed hunk size in bytes.
storedBytesintThe number of bytes stored for this hunk.
compressionTypebyteThe map compression type.
codecNamestringThe codec name.
ratiodoubleCompression ratio.
Properties
CodecName
The codec name ("zlib", "zstd", "lzma", "cdfl", "none", "self").
public string CodecName { get; }
Property Value
CompressionType
The map compression type: 0-3 (codec index), 4 (none), 5 (SELF reference).
public byte CompressionType { get; }
Property Value
HunkCount
The total number of hunks in the image.
public uint HunkCount { get; }
Property Value
HunkIndex
The zero-based index of the hunk being reported.
public uint HunkIndex { get; }
Property Value
Ratio
Compression ratio = StoredBytes / RawBytes; 0 for SELF references.
public double Ratio { get; }
Property Value
RawBytes
The uncompressed hunk size in bytes.
public int RawBytes { get; }
Property Value
StoredBytes
The number of bytes stored for this hunk: 0 for SELF references, the hunk size for COMPRESSION_NONE, otherwise the compressed length.
public int StoredBytes { get; }