XZError

public enum XZError: 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.
  • Either magic number in header or footer was not equal to predefined value.

    Declaration

    Swift

    case WrongMagic
  • Either size of decompressed data was not equal to specified one in block header or amount of compressed data read was different from the one stored in block header.

    Declaration

    Swift

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

    Declaration

    Swift

    case WrongCheck(Data)
  • Either null byte encountered or exceeded maximum amount bytes during reading multi byte number.

    Declaration

    Swift

    case MultiByteIntegerError