GzipError
public enum GzipError : Error
Represents an error which happened while processing a 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 the archive. Associated value of the error contains
GzipArchive.Member
s for all already decompressed data:- if
unarchive
function was called then associated array will have only one element, since this function always processes only first member of archive. - if
multiUnarchive
function was called then associated array will have an element for each already decompressed member, including the one with mismatching checksum.
Declaration
Swift
case wrongCRC([GzipArchive.Member])
- if
-
Computed ‘isize’ didn’t match the value stored in the archive.
Declaration
Swift
case wrongISize
-
Either specified file name or comment cannot be encoded using ISO Latin-1 encoding.
Declaration
Swift
case cannotEncodeISOLatin1