Struct MapEntry

Namespace
CHDSharp.Encoder.Models
Assembly
CHDSharpLib.dll

Represents a single entry in a CHD v5 hunk map.

public struct MapEntry
Inherited Members

Fields

CompLength

The compressed data length in bytes.

public uint CompLength

Field Value

uint

Compression

The compression type for this hunk.

public byte Compression

Field Value

byte

CompressionNone

No compression; hunk data is stored verbatim.

public const byte CompressionNone = 4

Field Value

byte

CompressionParent

Hunk data is filled from the parent image.

public const byte CompressionParent = 6

Field Value

byte

CompressionSelf

Hunk is identical to an earlier hunk in this same image; Offset holds the source hunk index.

public const byte CompressionSelf = 5

Field Value

byte

CompressionType0

Compression type 0 (deflate codec 0).

public const byte CompressionType0 = 0

Field Value

byte

CompressionType1

Compression type 1 (deflate codec 1).

public const byte CompressionType1 = 1

Field Value

byte

CompressionType2

Compression type 2 (deflate codec 2).

public const byte CompressionType2 = 2

Field Value

byte

CompressionType3

Compression type 3 (deflate codec 3).

public const byte CompressionType3 = 3

Field Value

byte

Crc16

CRC-16 checksum of the uncompressed hunk data.

public ushort Crc16

Field Value

ushort

Offset

The byte offset to the hunk data within the file.

public ulong Offset

Field Value

ulong

Methods

WriteRawMapEntry(byte[], int, MapEntry)

Writes a map entry in raw (uncompressed) binary format.

public static void WriteRawMapEntry(byte[] rawMap, int entryIndex, MapEntry entry)

Parameters

rawMap byte[]

The destination byte array.

entryIndex int

The zero-based index of the entry.

entry MapEntry

The map entry to serialize.