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.
    See more

    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.
    See more

    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.
    See more

    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.
    See more

    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.
    See more

    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: length and nlength bytes 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.
    See more

    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.
    See more

    Declaration

    Swift

    public enum BZip2Error: 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.
    See more

    Declaration

    Swift

    public enum XZError: Error