# uproot.ZLIB

Defined in uproot.compression on line 116.

Inheritance order:
uproot.compression.Compression uproot.compression._DecompressZLIB

class uproot.compression.ZLIB(level)
  Parameters:

    level (int, 0-9) – Compression level: 0 is uncompressed, 1 is minimally compressed, and 9 is maximally compressed.

  Represents the ZLIB compression algorithm.

  If `ZLIB.library` is `"zlib"` (default), Uproot uses `zlib` from the Python standard library.

  If `ZLIB.library` is `"isal"`, Uproot uses `isal.isal_zlib`.

  If `ZLIB.library` is `"deflate"`, Uproot uses `deflate.deflate_zlib`.

## compress

ZLIB.compress(data: bytes) → bytes

## from_code

Inherited from uproot.compression.Compression.

classmethod ZLIB.from_code(code)

  Constructs a uproot.compression.Compression from a raw `fCompress` integer.

## from_code_pair

Inherited from uproot.compression.Compression.

classmethod ZLIB.from_code_pair(algorithm, level)

  Constructs a uproot.compression.Compression from a pair of integers representing `algorithm` and `level`.

## code

Inherited from uproot.compression.Compression.

ZLIB.code

  This uproot.compression.Compression as a raw `fCompress` integer.

## code_pair

Inherited from uproot.compression.Compression.

ZLIB.code_pair

  This uproot.compression.Compression as a 2-tuple of integers representing algorithm and level.

## level

Inherited from uproot.compression.Compression.

ZLIB.level

  0 is uncompressed, 1 is minimally compressed, and 9 is maximally compressed.

  This value to adapted to the ISAL compression levels if that library is used. Note: with ISAL 0 is lowest compression, not uncompressed!

  > as such, we don’t allow 0 in isal mode for compatibility reasons.

  Type:

    The compression level

## decompress

Inherited from uproot.compression._DecompressZLIB.

ZLIB.decompress(data: bytes, uncompressed_bytes=None) → bytes