BZip2

public class BZip2: DecompressionAlgorithm

Provides decompression function for BZip2 algorithm.

  • Decompresses data using BZip2 algortihm.

    If data is not actually compressed with BZip2, BZip2Error will be thrown.

    Throws

    BZip2Error if unexpected byte (bit) sequence was encountered in data. It may indicate that either data is damaged or it might not be compressed with BZip2 at all.

    Declaration

    Swift

    public static func decompress(data: Data) throws -> Data

    Parameters

    data

    Data compressed with BZip2.

    Return Value

    Decompressed data.