namespace SabreTools.Data.Models.PKZIP
{
///
/// Central directory file header
///
///
public class CentralDirectoryFileHeader
{
///
/// Central file header signature (0x02014B50)
///
public uint Signature { get; set; }
///
/// Host system on which the file attributes are compatible
///
public HostSystem HostSystem { get; set; }
///
/// ZIP specification version
///
public byte VersionMadeBy { get; set; }
///
/// Version needed to extract
///
/// TODO: Add mapping of versions
public ushort VersionNeededToExtract { get; set; }
///
/// General purpose bit flag
///
public GeneralPurposeBitFlags Flags { get; set; }
///
/// Compression method
///
public CompressionMethod CompressionMethod { get; set; }
///
/// Last modified file time
///
public ushort LastModifedFileTime { get; set; }
///
/// Last modified file date
///
public ushort LastModifiedFileDate { get; set; }
///
/// CRC-32
///
public uint CRC32 { get; set; }
///
/// Compressed size
///
public uint CompressedSize { get; set; }
///
/// Uncompressed size
///
public uint UncompressedSize { get; set; }
///
/// File name length
///
public ushort FileNameLength { get; set; }
///
/// Extra field length
///
public ushort ExtraFieldLength { get; set; }
///
/// File comment length
///
public ushort FileCommentLength { get; set; }
///
/// Disk number start
///
public ushort DiskNumberStart { get; set; }
///
/// Internal file attributes
///
public InternalFileAttributes InternalFileAttributes { get; set; }
///
/// External file attributes
///
public uint ExternalFileAttributes { get; set; }
///
/// Relative offset of local header
///
///
/// If ZIP64 and value is 0xFFFFFFFF, size will be in the
/// extended information extra field
///
public uint RelativeOffsetOfLocalHeader { get; set; }
///
/// File name (variable size)
///
public string? FileName { get; set; }
///
/// Extra fields (variable size)
///
public ExtensibleDataField[]? ExtraFields { get; set; }
///
/// File comment (variable size)
///
public string? FileComment { get; set; }
}
}