diff --git a/SabreTools.Library/Data/Enums.cs b/SabreTools.Library/Data/Enums.cs index eb262c46..66d6e29c 100644 --- a/SabreTools.Library/Data/Enums.cs +++ b/SabreTools.Library/Data/Enums.cs @@ -1,507 +1,517 @@ namespace SabreTools.Library.Data { - #region Archival + #region Archival - /// - /// Version of tool archive made by - /// - public enum ArchiveVersion : ushort - { - MSDOSandOS2 = 0, - Amiga = 1, - OpenVMS = 2, - UNIX = 3, - VMCMS = 4, - AtariST = 5, - OS2HPFS = 6, - Macintosh = 7, - ZSystem = 8, - CPM = 9, - WindowsNTFS = 10, - MVS = 11, - VSE = 12, - AcornRisc = 13, - VFAT = 14, - AlternateMVS = 15, - BeOS = 16, - Tandem = 17, - OS400 = 18, - OSXDarwin = 19, - TorrentZip = 20, - TorrentZip64 = 45, - } + /// + /// Version of tool archive made by + /// + public enum ArchiveVersion : ushort + { + MSDOSandOS2 = 0, + Amiga = 1, + OpenVMS = 2, + UNIX = 3, + VMCMS = 4, + AtariST = 5, + OS2HPFS = 6, + Macintosh = 7, + ZSystem = 8, + CPM = 9, + WindowsNTFS = 10, + MVS = 11, + VSE = 12, + AcornRisc = 13, + VFAT = 14, + AlternateMVS = 15, + BeOS = 16, + Tandem = 17, + OS400 = 18, + OSXDarwin = 19, + TorrentZip = 20, + TorrentZip64 = 45, + } - /// - /// Availible CHD codec formats - /// - public enum CHDCodecType : uint - { - CHD_CODEC_NONE = 0, + /// + /// Availible CHD codec formats + /// + public enum CHD_CODEC : uint + { + NONE = 0, - // general codecs - CHD_CODEC_ZLIB = 0x7a6c6962, // zlib - CHD_CODEC_LZMA = 0x6c7a6d61, // lzma - CHD_CODEC_HUFFMAN = 0x68756666, // huff - CHD_CODEC_FLAC = 0x666c6163, // flac + #region General Codecs - // general codecs with CD frontend - CHD_CODEC_CD_ZLIB = 0x63647a6c, // cdzl - CHD_CODEC_CD_LZMA = 0x63646c7a, // cdlz - CHD_CODEC_CD_FLAC = 0x6364666c, // cdfl + ZLIB = 0x7a6c6962, // zlib + LZMA = 0x6c7a6d61, // lzma + HUFFMAN = 0x68756666, // huff + FLAC = 0x666c6163, // flac - // A/V codecs - CHD_CODEC_AVHUFF = 0x61766875, // avhu + #endregion - // pseudo-codecs returned by hunk_info - CHD_CODEC_SELF = 1, // copy of another hunk - CHD_CODEC_PARENT = 2, // copy of a parent's hunk - CHD_CODEC_MINI = 3, // legacy "mini" 8-byte repeat - } + #region General Codecs with CD Frontend - /// - /// Compression method based on flag - /// - public enum CompressionMethod : ushort - { - Stored = 0, - Shrunk = 1, - ReducedCompressionFactor1 = 2, - ReducedCompressionFactor2 = 3, - ReducedCompressionFactor3 = 4, - ReducedCompressionFactor4 = 5, - Imploded = 6, - Tokenizing = 7, - Deflated = 8, - Delfate64 = 9, - PKWAREDataCompressionLibrary = 10, - BZIP2 = 12, - LZMA = 14, - IBMTERSE = 18, - IBMLZ77 = 19, - WavPak = 97, - PPMdVersionIRev1 = 98, + CD_ZLIB = 0x63647a6c, // cdzl + CD_LZMA = 0x63646c7a, // cdlz + CD_FLAC = 0x6364666c, // cdfl - // Reserved and unused (SHOULD NOT BE USED) - Type11 = 11, - Type13 = 13, - Type15 = 15, - Type16 = 16, - Type17 = 17, - } + #endregion - /// - /// Type of file that is being looked at - /// - public enum FileType - { - // Singleton - None = 0, - CHD, + #region A/V Codecs - // Can contain children - Folder, - SevenZipArchive, - GZipArchive, - LRZipArchive, - LZ4Archive, - RarArchive, - TapeArchive, - XZArchive, - ZipArchive, - ZPAQArchive, - ZstdArchive, - } + AVHUFF = 0x61766875, // avhu - /// - /// Output format for rebuilt files - /// - public enum OutputFormat - { - // Currently implemented - Folder = 0, - TorrentZip = 1, - TorrentGzip = 2, - TapeArchive = 5, + #endregion - // Currently unimplemented fully - Torrent7Zip = 3, - TorrentRar = 4, - TorrentXZ = 6, - TorrentLRZip = 7, - TorrentLZ4 = 8, - TorrentZstd = 9, - TorrentZPAQ = 10, - } + #region Pseudo-Codecs Returned by hunk_info - /// - /// RAR extra area flag - /// - public enum RarExtraAreaFlag : uint - { - FileEncryption = 0x01, - FileHash = 0x02, - FileTime = 0x03, - FileVersion = 0x04, - Redirection = 0x05, - UnixOwner = 0x06, - ServiceData = 0x07, - } + SELF = 1, // copy of another hunk + PARENT = 2, // copy of a parent's hunk + MINI = 3, // legacy "mini" 8-byte repeat - /// - /// RAR header types - /// - public enum RarHeaderType : uint - { - MainArchiveHeader = 1, - File = 2, - Service = 3, - ArchiveEncryption = 4, - EndOfArchive = 5, - } + #endregion + } - /// - /// RAR entry redirection type - /// - public enum RarRedirectionType : uint - { - UnixSymlink = 0x0001, - WindowsSymlink = 0x0002, - WindowsJunction = 0x0003, - HardLink = 0x0004, - FileCopy = 0x0005, - } + /// + /// Compression method based on flag + /// + public enum CompressionMethod : ushort + { + Stored = 0, + Shrunk = 1, + ReducedCompressionFactor1 = 2, + ReducedCompressionFactor2 = 3, + ReducedCompressionFactor3 = 4, + ReducedCompressionFactor4 = 5, + Imploded = 6, + Tokenizing = 7, + Deflated = 8, + Delfate64 = 9, + PKWAREDataCompressionLibrary = 10, + Type11 = 11, // Reserved and unused (SHOULD NOT BE USED) + BZIP2 = 12, + Type13 = 13, // Reserved and unused (SHOULD NOT BE USED) + LZMA = 14, + Type15 = 15, // Reserved and unused (SHOULD NOT BE USED) + Type16 = 16, // Reserved and unused (SHOULD NOT BE USED) + Type17 = 17, // Reserved and unused (SHOULD NOT BE USED) + IBMTERSE = 18, + IBMLZ77 = 19, + WavPak = 97, + PPMdVersionIRev1 = 98, + } - /// - /// 7zip Properties - /// - public enum SevenZipProperties : uint - { - kEnd = 0x00, + /// + /// Type of file that is being looked at + /// + public enum FileType + { + // Singleton + None = 0, + CHD, - kHeader = 0x01, + // Can contain children + Folder, + SevenZipArchive, + GZipArchive, + LRZipArchive, + LZ4Archive, + RarArchive, + TapeArchive, + XZArchive, + ZipArchive, + ZPAQArchive, + ZstdArchive, + } - kArchiveProperties = 0x02, + /// + /// Output format for rebuilt files + /// + public enum OutputFormat + { + // Currently implemented + Folder = 0, + TorrentZip = 1, + TorrentGzip = 2, + TapeArchive = 5, - kAdditionalStreamsInfo = 0x03, - kMainStreamsInfo = 0x04, - kFilesInfo = 0x05, + // Currently unimplemented fully + Torrent7Zip = 3, + TorrentRar = 4, + TorrentXZ = 6, + TorrentLRZip = 7, + TorrentLZ4 = 8, + TorrentZstd = 9, + TorrentZPAQ = 10, + } - kPackInfo = 0x06, - kUnPackInfo = 0x07, - kSubStreamsInfo = 0x08, + /// + /// RAR extra area flag + /// + public enum RarExtraAreaFlag : uint + { + FileEncryption = 0x01, + FileHash = 0x02, + FileTime = 0x03, + FileVersion = 0x04, + Redirection = 0x05, + UnixOwner = 0x06, + ServiceData = 0x07, + } - kSize = 0x09, - kCRC = 0x0A, + /// + /// RAR header types + /// + public enum RarHeaderType : uint + { + MainArchiveHeader = 1, + File = 2, + Service = 3, + ArchiveEncryption = 4, + EndOfArchive = 5, + } - kFolder = 0x0B, + /// + /// RAR entry redirection type + /// + public enum RarRedirectionType : uint + { + UnixSymlink = 0x0001, + WindowsSymlink = 0x0002, + WindowsJunction = 0x0003, + HardLink = 0x0004, + FileCopy = 0x0005, + } - kCodersUnPackSize = 0x0C, - kNumUnPackStream = 0x0D, + /// + /// 7zip Properties + /// + public enum SevenZipProperties : uint + { + kEnd = 0x00, - kEmptyStream = 0x0E, - kEmptyFile = 0x0F, - kAnti = 0x10, + kHeader = 0x01, - kName = 0x11, - kCTime = 0x12, - kATime = 0x13, - kMTime = 0x14, - kWinAttributes = 0x15, - kComment = 0x16, + kArchiveProperties = 0x02, - kEncodedHeader = 0x17, + kAdditionalStreamsInfo = 0x03, + kMainStreamsInfo = 0x04, + kFilesInfo = 0x05, - kStartPos = 0x18, - kDummy = 0x19, - } + kPackInfo = 0x06, + kUnPackInfo = 0x07, + kSubStreamsInfo = 0x08, - /// - /// Zip open type - /// - /// https://raw.githubusercontent.com/gjefferyes/RomVault/5a93500001f0d068f32cf77a048950717507f733/ROMVault2/SupportedFiles/ZipEnums.cs - public enum ZipOpenType - { - Closed, - OpenRead, - OpenWrite - } + kSize = 0x09, + kCRC = 0x0A, - /// - /// Zip testing type - /// - /// https://raw.githubusercontent.com/gjefferyes/RomVault/5a93500001f0d068f32cf77a048950717507f733/ROMVault2/SupportedFiles/ZipEnums.cs - public enum ZipReturn - { - ZipGood, - ZipFileLocked, - ZipFileCountError, - ZipSignatureError, - ZipExtraDataOnEndOfZip, - ZipUnsupportedCompression, - ZipLocalFileHeaderError, - ZipCentralDirError, - ZipEndOfCentralDirectoryError, - Zip64EndOfCentralDirError, - Zip64EndOfCentralDirectoryLocatorError, - ZipReadingFromOutputFile, - ZipWritingToInputFile, - ZipErrorGettingDataStream, - ZipCRCDecodeError, - ZipDecodeError, - ZipFileNameToLong, - ZipFileAlreadyOpen, - ZipCannotFastOpen, - ZipErrorOpeningFile, - ZipErrorFileNotFound, - ZipErrorReadingFile, - ZipErrorTimeStamp, - ZipErrorRollBackFile, - ZipUntested - } + kFolder = 0x0B, - #endregion + kCodersUnPackSize = 0x0C, + kNumUnPackStream = 0x0D, - #region DatFile related + kEmptyStream = 0x0E, + kEmptyFile = 0x0F, + kAnti = 0x10, - /// - /// Determines the DAT deduplication type - /// - public enum DedupeType - { - None = 0, - Full, + kName = 0x11, + kCTime = 0x12, + kATime = 0x13, + kMTime = 0x14, + kWinAttributes = 0x15, + kComment = 0x16, - // Force only deduping with certain types - Game, - CRC, - MD5, - SHA1, - SHA256, - SHA384, - SHA512, - } + kEncodedHeader = 0x17, - /// - /// Determines forcemerging tag for DAT output - /// - public enum ForceMerging - { - None = 0, - Split, - Merged, - NonMerged, - Full, - } + kStartPos = 0x18, + kDummy = 0x19, + } - /// - /// Determines forcenodump tag for DAT output - /// - public enum ForceNodump - { - None = 0, - Obsolete, - Required, - Ignore, - } + /// + /// Zip open type + /// + /// https://raw.githubusercontent.com/gjefferyes/RomVault/5a93500001f0d068f32cf77a048950717507f733/ROMVault2/SupportedFiles/ZipEnums.cs + public enum ZipOpenType + { + Closed, + OpenRead, + OpenWrite + } - /// - /// Determines forcepacking tag for DAT output - /// - public enum ForcePacking - { - None = 0, - Zip, - Unzip, - } + /// + /// Zip testing type + /// + /// https://raw.githubusercontent.com/gjefferyes/RomVault/5a93500001f0d068f32cf77a048950717507f733/ROMVault2/SupportedFiles/ZipEnums.cs + public enum ZipReturn + { + ZipGood, + ZipFileLocked, + ZipFileCountError, + ZipSignatureError, + ZipExtraDataOnEndOfZip, + ZipUnsupportedCompression, + ZipLocalFileHeaderError, + ZipCentralDirError, + ZipEndOfCentralDirectoryError, + Zip64EndOfCentralDirError, + Zip64EndOfCentralDirectoryLocatorError, + ZipReadingFromOutputFile, + ZipWritingToInputFile, + ZipErrorGettingDataStream, + ZipCRCDecodeError, + ZipDecodeError, + ZipFileNameToLong, + ZipFileAlreadyOpen, + ZipCannotFastOpen, + ZipErrorOpeningFile, + ZipErrorFileNotFound, + ZipErrorReadingFile, + ZipErrorTimeStamp, + ZipErrorRollBackFile, + ZipUntested + } - /// - /// Determines which files should be skipped in DFD - /// - public enum SkipFileType - { - None = 0, - Archive, - File, - } + #endregion - /// - /// Determines how the current dictionary is sorted by - /// - public enum SortedBy - { - Default = 0, - Size, - CRC, - MD5, - SHA1, - SHA256, - SHA384, - SHA512, - Game, - } + #region DatFile related - /// - /// Determines how a DAT will be split internally - /// - public enum SplitType - { - None = 0, - NonMerged, - Merged, - FullNonMerged, - Split, - DeviceNonMerged - } + /// + /// Determines the DAT deduplication type + /// + public enum DedupeType + { + None = 0, + Full, - #endregion + // Force only deduping with certain types + Game, + CRC, + MD5, + SHA1, + SHA256, + SHA384, + SHA512, + } - #region DatItem related + /// + /// Determines forcemerging tag for DAT output + /// + public enum ForceMerging + { + None = 0, + Split, + Merged, + NonMerged, + Full, + } - /// - /// List of valid field types within a DatItem/Machine - /// - public enum Field : int - { - NULL = 0, + /// + /// Determines forcenodump tag for DAT output + /// + public enum ForceNodump + { + None = 0, + Obsolete, + Required, + Ignore, + } - // Generic DatItem - Name, - PartName, - PartInterface, - Features, - AreaName, - AreaSize, + /// + /// Determines forcepacking tag for DAT output + /// + public enum ForcePacking + { + None = 0, + Zip, + Unzip, + } - // Machine - MachineName, - Comment, - Description, - Year, - Manufacturer, - Publisher, - RomOf, - CloneOf, - SampleOf, - Supported, - SourceFile, - Runnable, - Board, - RebuildTo, - Devices, - SlotOptions, - Infos, - MachineType, + /// + /// Determines which files should be skipped in DFD + /// + public enum SkipFileType + { + None = 0, + Archive, + File, + } - // BiosSet - Default, + /// + /// Determines how the current dictionary is sorted by + /// + public enum SortedBy + { + Default = 0, + Size, + CRC, + MD5, + SHA1, + SHA256, + SHA384, + SHA512, + Game, + } - // Disk - MD5, - SHA1, - SHA256, - SHA384, - SHA512, - Merge, - Region, - Index, - Writable, - Optional, - Status, + /// + /// Determines how a DAT will be split internally + /// + public enum SplitType + { + None = 0, + NonMerged, + Merged, + FullNonMerged, + Split, + DeviceNonMerged + } - // Release - Language, - Date, + #endregion - // Rom - Bios, - Size, - CRC, - Offset, - } + #region DatItem related - /// - /// Determine what type of file an item is - /// - public enum ItemType - { - Rom = 0, - Disk = 1, - Sample = 2, - Release = 3, - BiosSet = 4, - Archive = 5, + /// + /// List of valid field types within a DatItem/Machine + /// + public enum Field : int + { + NULL = 0, - Blank = 99, // This is not a real type, only used internally - } + // Generic DatItem + Name, + PartName, + PartInterface, + Features, + AreaName, + AreaSize, - #endregion + // Machine + MachineName, + Comment, + Description, + Year, + Manufacturer, + Publisher, + RomOf, + CloneOf, + SampleOf, + Supported, + SourceFile, + Runnable, + Board, + RebuildTo, + Devices, + SlotOptions, + Infos, + MachineType, - #region Help related + // BiosSet + Default, - /// - /// Determines the feature type to check for - /// - public enum FeatureType - { - Flag = 0, - String, - Int32, - Int64, - List, - } + // Disk + MD5, + SHA1, + SHA256, + SHA384, + SHA512, + Merge, + Region, + Index, + Writable, + Optional, + Status, - #endregion + // Release + Language, + Date, - #region Logging related + // Rom + Bios, + Size, + CRC, + Offset, + } - /// - /// Severity of the logging statement - /// - public enum LogLevel - { - VERBOSE = 0, - USER, - WARNING, - ERROR, - } + /// + /// Determine what type of file an item is + /// + public enum ItemType + { + Rom = 0, + Disk = 1, + Sample = 2, + Release = 3, + BiosSet = 4, + Archive = 5, - #endregion + Blank = 99, // This is not a real type, only used internally + } - #region Skippers and Mappers + #endregion - /// - /// Determines the header skip operation - /// - public enum HeaderSkipOperation - { - None = 0, - Bitswap, - Byteswap, - Wordswap, - WordByteswap, - } + #region Help related - /// - /// Determines the type of test to be done - /// - public enum HeaderSkipTest - { - Data = 0, - Or, - Xor, - And, - File, - } + /// + /// Determines the feature type to check for + /// + public enum FeatureType + { + Flag = 0, + String, + Int32, + Int64, + List, + } - /// - /// Determines the operator to be used in a file test - /// - public enum HeaderSkipTestFileOperator - { - Equal = 0, - Less, - Greater, - } + #endregion - #endregion + #region Logging related + + /// + /// Severity of the logging statement + /// + public enum LogLevel + { + VERBOSE = 0, + USER, + WARNING, + ERROR, + } + + #endregion + + #region Skippers and Mappers + + /// + /// Determines the header skip operation + /// + public enum HeaderSkipOperation + { + None = 0, + Bitswap, + Byteswap, + Wordswap, + WordByteswap, + } + + /// + /// Determines the type of test to be done + /// + public enum HeaderSkipTest + { + Data = 0, + Or, + Xor, + And, + File, + } + + /// + /// Determines the operator to be used in a file test + /// + public enum HeaderSkipTestFileOperator + { + Equal = 0, + Less, + Greater, + } + + #endregion } diff --git a/SabreTools.Library/FileTypes/CHDFile.cs b/SabreTools.Library/FileTypes/CHDFile.cs index 67524669..7fee31a2 100644 --- a/SabreTools.Library/FileTypes/CHDFile.cs +++ b/SabreTools.Library/FileTypes/CHDFile.cs @@ -101,7 +101,7 @@ namespace SabreTools.Library.FileTypes private ulong m_hunkcount; // number of hunks represented private uint m_unitbytes; // size of each unit in bytes private ulong m_unitcount; // number of units represented - private CHDCodecType[] m_compression = new CHDCodecType[4]; // array of compression types used + private CHD_CODEC[] m_compression = new CHD_CODEC[4]; // array of compression types used // map information private uint m_mapentrybytes; // length of each entry in a map @@ -300,14 +300,14 @@ namespace SabreTools.Library.FileTypes // Determine compression switch (m_br.ReadUInt32()) { - case 0: m_compression[0] = CHDCodecType.CHD_CODEC_NONE; break; - case 1: m_compression[0] = CHDCodecType.CHD_CODEC_ZLIB; break; - case 2: m_compression[0] = CHDCodecType.CHD_CODEC_ZLIB; break; - case 3: m_compression[0] = CHDCodecType.CHD_CODEC_AVHUFF; break; + case 0: m_compression[0] = CHD_CODEC.NONE; break; + case 1: m_compression[0] = CHD_CODEC.ZLIB; break; + case 2: m_compression[0] = CHD_CODEC.ZLIB; break; + case 3: m_compression[0] = CHD_CODEC.AVHUFF; break; default: /* throw CHDERR_UNKNOWN_COMPRESSION; */ return null; } - m_compression[1] = m_compression[2] = m_compression[3] = CHDCodecType.CHD_CODEC_NONE; + m_compression[1] = m_compression[2] = m_compression[3] = CHD_CODEC.NONE; m_sectorsperhunk = m_br.ReadUInt32Reverse(); m_hunkcount = m_br.ReadUInt32Reverse(); @@ -343,14 +343,14 @@ namespace SabreTools.Library.FileTypes // Determine compression switch (m_br.ReadUInt32()) { - case 0: m_compression[0] = CHDCodecType.CHD_CODEC_NONE; break; - case 1: m_compression[0] = CHDCodecType.CHD_CODEC_ZLIB; break; - case 2: m_compression[0] = CHDCodecType.CHD_CODEC_ZLIB; break; - case 3: m_compression[0] = CHDCodecType.CHD_CODEC_AVHUFF; break; + case 0: m_compression[0] = CHD_CODEC.NONE; break; + case 1: m_compression[0] = CHD_CODEC.ZLIB; break; + case 2: m_compression[0] = CHD_CODEC.ZLIB; break; + case 3: m_compression[0] = CHD_CODEC.AVHUFF; break; default: /* throw CHDERR_UNKNOWN_COMPRESSION; */ return null; } - m_compression[1] = m_compression[2] = m_compression[3] = CHDCodecType.CHD_CODEC_NONE; + m_compression[1] = m_compression[2] = m_compression[3] = CHD_CODEC.NONE; m_sectorsperhunk = m_br.ReadUInt32Reverse(); m_hunkcount = m_br.ReadUInt32Reverse(); @@ -387,14 +387,14 @@ namespace SabreTools.Library.FileTypes // Determine compression switch (m_br.ReadUInt32()) { - case 0: m_compression[0] = CHDCodecType.CHD_CODEC_NONE; break; - case 1: m_compression[0] = CHDCodecType.CHD_CODEC_ZLIB; break; - case 2: m_compression[0] = CHDCodecType.CHD_CODEC_ZLIB; break; - case 3: m_compression[0] = CHDCodecType.CHD_CODEC_AVHUFF; break; + case 0: m_compression[0] = CHD_CODEC.NONE; break; + case 1: m_compression[0] = CHD_CODEC.ZLIB; break; + case 2: m_compression[0] = CHD_CODEC.ZLIB; break; + case 3: m_compression[0] = CHD_CODEC.AVHUFF; break; default: /* throw CHDERR_UNKNOWN_COMPRESSION; */ return null; } - m_compression[1] = m_compression[2] = m_compression[3] = CHDCodecType.CHD_CODEC_NONE; + m_compression[1] = m_compression[2] = m_compression[3] = CHD_CODEC.NONE; m_hunkcount = m_br.ReadUInt32Reverse(); m_logicalbytes = m_br.ReadUInt64Reverse(); @@ -435,14 +435,14 @@ namespace SabreTools.Library.FileTypes // Determine compression switch (m_br.ReadUInt32()) { - case 0: m_compression[0] = CHDCodecType.CHD_CODEC_NONE; break; - case 1: m_compression[0] = CHDCodecType.CHD_CODEC_ZLIB; break; - case 2: m_compression[0] = CHDCodecType.CHD_CODEC_ZLIB; break; - case 3: m_compression[0] = CHDCodecType.CHD_CODEC_AVHUFF; break; + case 0: m_compression[0] = CHD_CODEC.NONE; break; + case 1: m_compression[0] = CHD_CODEC.ZLIB; break; + case 2: m_compression[0] = CHD_CODEC.ZLIB; break; + case 3: m_compression[0] = CHD_CODEC.AVHUFF; break; default: /* throw CHDERR_UNKNOWN_COMPRESSION; */ return null; } - m_compression[1] = m_compression[2] = m_compression[3] = CHDCodecType.CHD_CODEC_NONE; + m_compression[1] = m_compression[2] = m_compression[3] = CHD_CODEC.NONE; m_hunkcount = m_br.ReadUInt32Reverse(); m_logicalbytes = m_br.ReadUInt64Reverse(); @@ -473,10 +473,10 @@ namespace SabreTools.Library.FileTypes byte[] sha1 = new byte[20]; // Determine compression - m_compression[0] = (CHDCodecType)m_br.ReadUInt32Reverse(); - m_compression[1] = (CHDCodecType)m_br.ReadUInt32Reverse(); - m_compression[2] = (CHDCodecType)m_br.ReadUInt32Reverse(); - m_compression[3] = (CHDCodecType)m_br.ReadUInt32Reverse(); + m_compression[0] = (CHD_CODEC)m_br.ReadUInt32Reverse(); + m_compression[1] = (CHD_CODEC)m_br.ReadUInt32Reverse(); + m_compression[2] = (CHD_CODEC)m_br.ReadUInt32Reverse(); + m_compression[3] = (CHD_CODEC)m_br.ReadUInt32Reverse(); m_logicalbytes = m_br.ReadUInt64Reverse(); m_mapoffset = m_br.ReadUInt64Reverse();