GzipError

public enum GzipError: Error

Represents an error, which happened during processing GZip archive. It may indicate that either archive is damaged or it might not be GZip archive at all.

  • First two bytes (‘magic’ number) of archive isn’t 31 and 139.

    Declaration

    Swift

    case wrongMagic
  • Compression method used in archive is different from Deflate, which is the only supported one.

    Declaration

    Swift

    case wrongCompressionMethod
  • One of the reserved fields in archive has an unexpected value, which can also mean (apart from damaged archive), that archive uses a newer version of GZip format.

    Declaration

    Swift

    case wrongFlags
  • Computed CRC of archive’s header doesn’t match the value stored in archive.

    Declaration

    Swift

    case wrongHeaderCRC
  • Computed checksum of uncompressed data doesn’t match the value stored in archive. Associated value of the error contains already decompressed data.

    Declaration

    Swift

    case wrongCRC(Data)
  • Computed ‘isize’ didn’t match the value stored in the archive.

    Declaration

    Swift

    case wrongISize