GzipHeader

public struct GzipHeader

Represents the header of a GZip archive.

  • Compression method of archive. Always .deflate for GZip archives.

    Declaration

    Swift

    public let compressionMethod: CompressionMethod
  • The most recent modification time of the original file. If corresponding archive’s field is set to 0, which means that no time was specified, then this property is nil.

    Declaration

    Swift

    public let modificationTime: Date?
  • Type of file system on which archivation took place.

    Declaration

    Swift

    public let osType: FileSystemType
  • Name of the original file. If archive doesn’t contain file’s name, then nil.

    Declaration

    Swift

    public let fileName: String?
  • Comment stored in archive. If archive doesn’t contain any comment, then nil.

    Declaration

    Swift

    public let comment: String?
  • True, if file is likely to be text file or ASCII-file.

    Declaration

    Swift

    public let isTextFile: Bool
  • Initializes the structure with the values from the first ‘member’ of GZip archive.

    Throws

    GzipError. It may indicate that either archive is damaged or it might not be archived with GZip at all.

    Declaration

    Swift

    public init(archive data: Data) throws

    Parameters

    archive

    Data archived with GZip.