namespace SabreTools.Data.Models.GZIP { /// public sealed class Header { /// /// IDentification 1 (0x1F) /// public byte ID1 { get; set; } /// /// IDentification 2 (0x8B) /// public byte ID2 { get; set; } /// /// Compression Method /// public CompressionMethod CompressionMethod { get; set; } /// /// FLaGs /// public Flags Flags { get; set; } /// /// Modification TIME /// /// This gives the most recent modification time of the original /// file being compressed. The time is in Unix format, i.e., /// seconds since 00:00:00 GMT, Jan. 1, 1970. (Note that this /// may cause problems for MS-DOS and other systems that use /// local rather than Universal time.) If the compressed data /// did not come from a file, MTIME is set to the time at which /// compression started. MTIME = 0 means no time stamp is /// available. /// public uint LastModifiedTime { get; set; } /// /// eXtra FLags /// public ExtraFlags ExtraFlags { get; set; } /// /// Operating System /// /// This identifies the type of file system on which compression /// took place. This may be useful in determining end-of-line /// convention for text files. /// public OperatingSystem OperatingSystem { get; set; } /// /// eXtra LENgth /// /// If FLG.FEXTRA is set, this gives the length of the optional /// extra field. /// public ushort ExtraLength { get; set; } /// /// Extra field /// /// If the FLG.FEXTRA bit is set, an "extra field" is present in /// the header, with total length XLEN bytes. It consists of a /// series of subfields, each of the form . /// /// This is the raw version of public byte[] ExtraFieldBytes { get; set; } = []; /// /// Extra field /// /// If the FLG.FEXTRA bit is set, an "extra field" is present in /// the header, with total length XLEN bytes. It consists of a /// series of subfields, each of the form . /// /// This is the processed version of public ExtraFieldData[]? ExtraField { get; set; } /// /// Original filename before compression, null-terminated /// public string? OriginalFileName { get; set; } /// /// File comment, null terminated /// public string? FileComment { get; set; } /// /// The CRC16 consists of the two least significant bytes of the /// CRC32 for all bytes of the gzip header up to and not including /// the CRC16. /// public ushort? CRC16 { get; set; } } }