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: |
required |
Returns:
Type | Description |
---|---|
bytes
|
Compressed value. |
Raises:
Type | Description |
---|---|
ValueError
|
On invalid |
decompress(value, method)
¶
Decompress value
with given method
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
bytes
|
Compressed value. |
required |
method |
str
|
Compression method, one of: |
required |
Returns:
Type | Description |
---|---|
bytes
|
Decompressed value. |
Raises:
Type | Description |
---|---|
ValueError
|
On invalid |