Class FlacCodec
Raw FLAC codec ('flac'), matching MAME's chd_flac_compressor: the hunk is
treated as interleaved 2-channel 16-bit 44100 Hz samples and encoded twice (as
little-endian and big-endian samples); the smaller result wins and a leading marker
byte ('L'/'B') records the stored endianness. The block size follows MAME's formula
(hunk samples halved until ≤ 2048). Decodable by CHDSharpLib's ChdReaders.Flac
and chdman.
public sealed class FlacCodec : IChdCodec
- Inheritance
-
FlacCodec
- Implements
- Inherited Members
Constructors
FlacCodec(uint)
Creates a raw FLAC codec for the given hunk size.
public FlacCodec(uint hunkBytes)
Parameters
hunkBytesuintHunk size in bytes; must be a multiple of 4 (2ch × 16-bit).
Properties
Tag
The four-character codec tag (see CodecTags).
public uint Tag { get; }
Property Value
Methods
Compress(byte[])
Compresses a full hunk. Returns null when the codec does not reduce the size.
public byte[]? Compress(byte[] data)
Parameters
databyte[]
Returns
- byte[]