Tins · parquet-full

API reference

The parquet_full package, from parquet-full 0.1.8, as published on mojoshelf (commit c15f51aee06c), by mojo doc from Mojo 1.2.0. Source.

The codec set that includes ZSTD, LZ4 and BROTLI.

zstd.mojo, lz4.mojo and brotli.mojo dlopen libzstd / liblz4 / libbrotli, so a consumer that wants these has to have those tins installed and on the include path:

mojo build … -I ../zstd.mojo/src -I ../lz4.mojo/src -I ../brotli.mojo/src

Everything DefaultCodecs handles is handled here too. Between the two sets that is every codec in the Parquet spec.

Structs

AllCodecs

struct AllCodecs

UNCOMPRESSED, SNAPPY, GZIP, ZSTD, BROTLI, LZ4_RAW and legacy LZ4 — every codec the Parquet spec defines.

Implements CodecSet, Movable

supports

def supports(codec: Int32) -> Bool

decompress

def decompress[page_origin: ImmOrigin, scratch_origin: MutOrigin](codec: Int32, data: Span[UInt8, page_origin], uncompressed_size: Int, ref[scratch_origin] scratch: List[UInt8]) -> Span[UInt8, origin_of(page_origin, scratch_origin)].Immutable

compress

def compress(codec: Int32, data: Span[UInt8]) -> List[UInt8]