Enums
The following enums are available globally.
-
Error happened during LZMA2 decompression. It may indicate that either the data is damaged or it might not be compressed with LZMA2 at all.
wrongProperties: reserved bits of LZMA2 properties byte weren’t zero.wrongDictionarySize: dictionary size was greater than 2^32.wrongControlByte: unsupported value of LZMA2 packet’s control byte.wrongReset: unsupported ‘reset’ value of LZMA2 packet’s.wrongSizes: size of compressed or decompressed data wasn’t the same as specified in LZMA2 packet.
Declaration
Swift
public enum LZMA2Error: Error
-
Error happened during unarchiving gzip archive. It may indicate that either the data is damaged or it might not be gzip archive at all.
wrongMagic: first two bytes of archive were not 31 and 139.wrongCompressionMethod: unsupported compression method (not 8 aka Deflate).wrongFlags: unsupported flags (reserved flags weren’t 0).wrongHeaderCRC: computed Cyclic Redundancy Check of archive’s header didn’t match the archive’s value.wrongCRC: computed Cyclic Redundancy Check of uncompressed data didn’t match the archive’s value. Associated value contains already decompressed data.wrongISize: size of uncompressed data modulo 2^32 didn’t match the archive’s value.
Declaration
Swift
public enum GzipError: Error
-
Error happened during processing ZIP archive (container). It may indicate that either the data is damaged or it might not be ZIP archive (container) at all.
notFoundCentralDirectoryEnd: end of Central Directoty record wasn’t found.wrongSignature: unsupported signature of one of ZIP container’s structures.wrongSize: incorrect compressed or uncompressed size of a ZIP container’s entry’s data.wrongVersion: unsupported number of version needed to extract ZIP container (unsupported features are required to open this file).multiVolumesNotSupported: unsupported feature: multi-volumed or spanned container.encryptionNotSupported: unsupported feature: encryption.patchingNotSupported: unsupported feature: patched data.compressionNotSupported: unsupported feature: specified compression method.wrongLocalHeader: local header of an entry wasn’t consistent with Central Directory record.wrongCRC32: computed checksum of entry’s data wasn’t the same as the one stored in container.
Declaration
Swift
public enum ZipError: Error
-
Error happened during LZMA decompression. It may indicate that either the data is damaged or it might not be compressed with LZMA at all.
wrongProperties: unsupported LZMA properties (greater than 225).rangeDecoderInitError: unable to initialize RangedDecoder.exceededUncompressedSize: the number of uncompressed bytes reached amount specified by archive while decoding wasn’t finished.windowIsEmpty: unable to repeat bytes because there is nothing to repeat.rangeDecoderFinishError: range decoder was in a bad state when finish marker was reached.repeatWillExceed: unable to repeat bytes because the number of bytes to repeat is greater than the amount bytes that is left to decode.notEnoughToRepeat: unable to repeat bytes because the amount of already decoded bytes is smaller than the repeat length.
Declaration
Swift
public enum LZMAError: Error
-
Error happened during unarchiving Zlib archive. It may indicate that either the data is damaged or it might not be Zlib archive at all.
wrongCompressionMethod: unsupported compression method (not 8).wrongCompressionInfo: unsupported compression info (greater than 7).wrongFcheck: first two bytes were inconsistent with each other.wrongCompressionLevel: unsupported compression level (not 0, 1, 2 or 3).WrongAdler32: computed Adler-32 checksum of uncompressed data didn’t match the archive’s value. Associated value contains already decompressed data.
Declaration
Swift
public enum ZlibError: Error
-
Error happened during deflate decompression. It may indicate that either the data is damaged or it might not be compressed with DEFLATE at all.
wrongUncompressedBlockLengths:lengthandnlengthbytes of uncompressed block were not compatible.wrongBlockType: unsupported block type (not 0, 1 or 2).wrongSymbol: unsupported Huffman tree’s symbol.symbolNotFound: symbol from input data was not found in Huffman tree.
Declaration
Swift
public enum DeflateError: Error
-
Error happened during bzip2 decompression. It may indicate that either the data is damaged or it might not be compressed with BZip2 at all.
wrongMagic: unsupported magic number (not 0x425a).wrongCompressionMethod: unsupported compression method (not type ‘h’).wrongBlockSize: unsupported block size (not ‘0’ — ‘9’).wrongBlockType: unsupported block type (not ‘pi’ or ‘sqrt(pi)’).randomizedBlock: block is randomized; this is not supported.wrongHuffmanGroups: unsupported number of Huffman tables/groups (not between 2 and 6).wrongSelector: unsupported selector (greater than total number of Huffman groups).wrongHuffmanLengthCode: unsupported code for Huffman length (not between 0 and 20).symbolNotFound: symbol from input data was not found in Huffman tree.wrongCRC: computed Cyclic Redundancy Check of uncompressed data didn’t match the archive’s value.
Declaration
Swift
public enum BZip2Error: Error
-
Error happened during processing TAR archive (container). It may indicate that either the data is damaged or it might not be TAR archive (container) at all.
error: error description.
Declaration
Swift
public enum TarError: Error
-
Error happened during unarchiving XZ archive. It may indicate that either the data is damaged or it might not be XZ archive at all.
wrongMagic: ‘magic’ bytes in archive’s header or footer weren’t equal to predefined value.wrongArchiveInfo: incorrect value of one of archive’s special field (in block, index, header or footer).fieldReservedValue: value of one of archive’s special field (in block, index, header or footer) had reserved value.wrongInfoCRC: incorrect value of one of archive’s special field (in block, index, header or footer).wrongFilterID: unsupported value of filter ID (not LZMA2’s 0x21).checkTypeSHA256: checksum’s type was SHA-256.wrongDataSize: size of compressed or decompressed data wasn’t the same as specified in block.wrongCheck: computed checksum of uncompressed data didn’t match the archive’s value. Associated value contains already decompressed data.wrongPadding: unsupported padding of one of structures in the archive.multiByteIntegerError: error happened during reading of one of so called ‘multi-byte’ numbers.
Declaration
Swift
public enum XZError: Error
View on GitHub
Enums Reference