Skip to content

gufo.liftbridge.compressor

compress(value, method)

Compress value with given method.

Parameters:

Name Type Description Default
value bytes

Uncompressed value.

required
method str

Compression method, one of: zlib, lzma.

required

Returns:

Type Description
bytes

Compressed value.

Raises:

Type Description
ValueError

On invalid method.

decompress(value, method)

Decompress value with given method.

Parameters:

Name Type Description Default
value bytes

Compressed value.

required
method str

Compression method, one of: zlib, lzma.

required

Returns:

Type Description
bytes

Decompressed value.

Raises:

Type Description
ValueError

On invalid method.