namespace SabreTools.Data.Models.UDF { /// /// UDF / ECMA-167 constant values and arrays /// /// /// public static class Constants { #region Volume Recognition Constants /// /// Size of a logical sector on optical media /// public const int SectorSize = 2048; /// /// Sector of the first Volume Structure Descriptor (after the 32KiB System Area) /// public const int VolumeRecognitionSequenceSector = 16; /// /// Sector of the first Anchor Volume Descriptor Pointer /// public const int AnchorVolumeDescriptorPointerSector = 256; /// /// Beginning Extended Area Descriptor identifier, "BEA01" /// public static readonly byte[] BeginningExtendedAreaDescriptor = [0x42, 0x45, 0x41, 0x30, 0x31]; /// /// NSR Descriptor identifier for ECMA-167 2nd edition (UDF 1.02 to 1.50), "NSR02" /// public static readonly byte[] NSR02 = [0x4E, 0x53, 0x52, 0x30, 0x32]; /// /// NSR Descriptor identifier for ECMA-167 3rd edition (UDF 2.00 and later), "NSR03" /// public static readonly byte[] NSR03 = [0x4E, 0x53, 0x52, 0x30, 0x33]; /// /// Terminating Extended Area Descriptor identifier, "TEA01" /// public static readonly byte[] TerminatingExtendedAreaDescriptor = [0x54, 0x45, 0x41, 0x30, 0x31]; /// /// ISO 9660 volume descriptor identifier, "CD001" (bridge discs) /// public static readonly byte[] CD001 = [0x43, 0x44, 0x30, 0x30, 0x31]; /// /// Boot Descriptor identifier, "BOOT2" /// public static readonly byte[] BOOT2 = [0x42, 0x4F, 0x4F, 0x54, 0x32]; /// /// ECMA-168 volume descriptor identifier, "CDW02" /// public static readonly byte[] CDW02 = [0x43, 0x44, 0x57, 0x30, 0x32]; #endregion #region Partition Map Constants /// /// Type 1 Partition Map type /// public const byte Type1PartitionMap = 1; /// /// Type 2 Partition Map type /// public const byte Type2PartitionMap = 2; /// /// Partition type identifier of a UDF Metadata Partition (UDF 2.50 and later) /// public const string MetadataPartitionIdentifier = "*UDF Metadata Partition"; /// /// Partition type identifier of a UDF Sparable Partition /// public const string SparablePartitionIdentifier = "*UDF Sparable Partition"; /// /// Partition type identifier of a UDF Virtual Partition /// public const string VirtualPartitionIdentifier = "*UDF Virtual Partition"; #endregion #region Character Set Constants /// /// OSTA Compressed Unicode, 8 bits per character /// public const byte CompressionId8 = 8; /// /// OSTA Compressed Unicode, 16 bits per character (big-endian) /// public const byte CompressionId16 = 16; #endregion #region Allocation Descriptor Constants /// /// Mask of the extent length in an allocation descriptor (the top two bits hold the extent type) /// public const uint ExtentLengthMask = 0x3FFFFFFF; /// /// Shift of the extent type in an allocation descriptor's extent length /// public const int ExtentTypeShift = 30; /// /// Mask of the allocation descriptor type in an ICB tag's flags /// public const ushort AllocationDescriptorTypeMask = 0x0007; #endregion } }