diff --git a/SabreTools.Library/Data/Enums.cs b/SabreTools.Library/Data/Enums.cs index a7f06aea..fb3b8e80 100644 --- a/SabreTools.Library/Data/Enums.cs +++ b/SabreTools.Library/Data/Enums.cs @@ -2,35 +2,6 @@ { #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, - } - /// /// Compression being used in CHD /// @@ -156,88 +127,6 @@ TorrentZPAQ, } - /// - /// RAR extra area flag - /// - public enum RarExtraAreaFlag : uint - { - FileEncryption = 0x01, - FileHash = 0x02, - FileTime = 0x03, - FileVersion = 0x04, - Redirection = 0x05, - UnixOwner = 0x06, - ServiceData = 0x07, - } - - /// - /// RAR header types - /// - public enum RarHeaderType : uint - { - MainArchiveHeader = 1, - File = 2, - Service = 3, - ArchiveEncryption = 4, - EndOfArchive = 5, - } - - /// - /// RAR entry redirection type - /// - public enum RarRedirectionType : uint - { - UnixSymlink = 0x0001, - WindowsSymlink = 0x0002, - WindowsJunction = 0x0003, - HardLink = 0x0004, - FileCopy = 0x0005, - } - - /// - /// 7zip Properties - /// - public enum SevenZipProperties : uint - { - kEnd = 0x00, - - kHeader = 0x01, - - kArchiveProperties = 0x02, - - kAdditionalStreamsInfo = 0x03, - kMainStreamsInfo = 0x04, - kFilesInfo = 0x05, - - kPackInfo = 0x06, - kUnPackInfo = 0x07, - kSubStreamsInfo = 0x08, - - kSize = 0x09, - kCRC = 0x0A, - - kFolder = 0x0B, - - kCodersUnPackSize = 0x0C, - kNumUnPackStream = 0x0D, - - kEmptyStream = 0x0E, - kEmptyFile = 0x0F, - kAnti = 0x10, - - kName = 0x11, - kCTime = 0x12, - kATime = 0x13, - kMTime = 0x14, - kWinAttributes = 0x15, - kComment = 0x16, - - kEncodedHeader = 0x17, - - kStartPos = 0x18, - kDummy = 0x19, - } - #endregion #region DatFile related diff --git a/SabreTools.Library/Data/Flags.cs b/SabreTools.Library/Data/Flags.cs index 0fba3641..3684ad5b 100644 --- a/SabreTools.Library/Data/Flags.cs +++ b/SabreTools.Library/Data/Flags.cs @@ -2,237 +2,6 @@ namespace SabreTools.Library.Data { - #region Archival - - /// - /// Determines the level to scan archives at - /// - [Flags] - public enum ArchiveScanLevel - { - // 7zip - SevenZipExternal = 1 << 0, - SevenZipInternal = 1 << 1, - SevenZipBoth = SevenZipExternal | SevenZipInternal, - - // GZip - GZipExternal = 1 << 2, - GZipInternal = 1 << 3, - GZipBoth = GZipExternal | GZipInternal, - - // RAR - RarExternal = 1 << 4, - RarInternal = 1 << 5, - RarBoth = RarExternal | RarInternal, - - // Zip - ZipExternal = 1 << 6, - ZipInternal = 1 << 7, - ZipBoth = ZipExternal | ZipInternal, - - // Tar - TarExternal = 1 << 8, - TarInternal = 1 << 9, - TarBoth = TarExternal | TarInternal, - } - - /// - /// Determines the archive general bit flags - /// - [Flags] - public enum GeneralPurposeBitFlag : ushort - { - Encrypted = 1 << 0, - ZeroedCRCAndSize = 1 << 3, - CompressedPatchedData = 1 << 5, - StrongEncryption = 1 << 6, - LanguageEncodingFlag = 1 << 11, - EncryptedCentralDirectory = 1 << 13, - - // For Method 6 - Imploding - Imploding8KSlidingDictionary = 1 << 1, - Imploding3ShannonFanoTrees = 1 << 2, - - // For Methods 8 and 9 - Deflating - DeflatingMaximumCompression = 1 << 1, - DeflatingFastCompression = 1 << 2, - DeflatingSuperFastCompression = 1 << 1 | 1 << 2, - EnhancedDeflating = 1 << 4, - - // For Method 14 - LZMA - LZMAEOSMarkerUsed = 1 << 1, - - // Reserved and unused (SHOULD NOT BE USED) - Bit7 = 1 << 7, - Bit8 = 1 << 8, - Bit9 = 1 << 9, - Bit10 = 1 << 10, - Bit12 = 1 << 12, // Reserved by PKWARE for enhanced compression - Bit14 = 1 << 14, // Reserved by PKWARE - Bit15 = 1 << 15, // Reserved by PKWARE - } - - /// - /// Internal file attributes used by archives - /// - [Flags] - public enum InternalFileAttributes : ushort - { - ASCIIOrTextFile = 1 << 0, - RecordLengthControl = 1 << 1, - - // Reserved and unused (SHOULD NOT BE USED) - Bit1 = 1 << 1, - Bit2 = 1 << 2, - } - - /// - /// RAR archive flags - /// - [Flags] - public enum RarArchiveFlags : uint - { - /// - /// Volume. Archive is a part of multivolume set. - /// - Volume = 1 << 0, - - /// - /// Volume number field is present. This flag is present in all volumes except first. - /// - VolumeNumberField = 1 << 1, - - /// - /// Solid archive. - /// - Solid = 1 << 2, - - /// - /// Recovery record is present. - /// - RecoveryRecordPresent = 1 << 3, - - /// - /// Locked archive. - /// - Locked = 1 << 4, - } - - /// - /// RAR entry encryption flags - /// - [Flags] - public enum RarEncryptionFlags : uint - { - PasswordCheckDataPresent = 1 << 0, - UseTweakedChecksums = 1 << 1, - - /* - If flag 0x0002 is present, RAR transforms the checksum preserving file or service data integrity, so it becomes dependent on - encryption key. It makes guessing file contents based on checksum impossible. It affects both data CRC32 in file header and - checksums in file hash record in extra area. - */ - } - - /// - /// RAR file flags - /// - [Flags] - public enum RarFileFlags : uint - { - /// - /// Directory file system object (file header only) - /// - Directory = 1 << 0, - - /// - /// Time field in Unix format is present - /// - TimeInUnix = 1 << 1, - - /// - /// CRC32 field is present - /// - CRCPresent = 1 << 2, - - /// - /// Unpacked size is unknown - /// - UnpackedSizeUnknown = 1 << 3, - - /* - If flag 0x0008 is set, unpacked size field is still present, but must be ignored and extraction - must be performed until reaching the end of compression stream. This flag can be set if actual - file size is larger than reported by OS or if file size is unknown such as for all volumes except - last when archiving from stdin to multivolume archive - */ - } - - /// - /// RAR header flags - /// - [Flags] - public enum RarHeaderFlags : uint - { - /// - /// Extra area is present in the end of header - /// - ExtraAreaPresent = 1 << 0, - - /// - /// Data area is present in the end of header - /// - DataAreaPresent = 1 << 1, - - /// - /// Blocks with unknown type and this flag must be skipped when updating an archive - /// - BlocksWithUnknownType = 1 << 2, - - /// - /// Data area is continuing from previous volume - /// - DataAreaContinuingFromPrevious = 1 << 3, - - /// - /// Data area is continuing in next volume - /// - DataAreaContinuingToNext = 1 << 4, - - /// - /// Block depends on preceding file block - /// - BlockDependsOnPreceding = 1 << 5, - - /// - /// Preserve a child block if host block is modified - /// - PreserveChildBlock = 1 << 6, - } - - [Flags] - public enum RarUnixOwnerRecordFlags : uint - { - UserNameStringIsPresent = 1 << 0, - GroupNameStringIsPresent = 1 << 1, - NumericUserIdIsPresent = 1 << 2, - NumericGroupIdIsPresent = 1 << 3, - } - - /// - /// RAR entry time flags - /// - [Flags] - public enum RarTimeFlags : uint - { - TimeInUnixFormat = 1 << 0, - ModificationTimePresent = 1 << 1, - CreationTimePresent = 1 << 2, - LastAccessTimePresent = 1 << 3, - } - - #endregion - #region DatFile related ///