pyarrow.decompress(buf, decompressed_size=None, codec='lz4', asbytes=False, memory_pool=None)#

Decompress data from buffer-like object.

bufpyarrow.Buffer, bytes, or memoryview-compatible object

Input object to decompress data from.

decompressed_sizeint, default None

If not specified, will be computed if the codec is able to determine the uncompressed buffer size.

codecstr, default ‘lz4’

Compression codec. Supported types: {‘brotli, ‘gzip’, ‘lz4’, ‘lz4_raw’, ‘snappy’, ‘zstd’}

asbytesbool, default False

Return result as Python bytes object, otherwise Buffer.

memory_poolMemoryPool, default None

Memory pool to use for buffer allocations, if any.

uncompressedpyarrow.Buffer or bytes (if asbytes=True)