Pcodec documentation

Pcodec is a codec for numerical sequences.

class pcodec.ChunkConfig(compression_level=Ellipsis, mode_spec=Ellipsis, delta_spec=Ellipsis, paging_spec=Ellipsis, enable_8_bit=False)
compression_level
delta_spec
enable_8_bit
mode_spec
paging_spec
class pcodec.DeltaSpec
static auto()
Returns:

a DeltaSpec that automatically detects a good delta encoding.

static no_op()
Returns:

a DeltaSpec that never does delta encoding.

static try_consecutive(order)
Returns:

a DeltaSpec that tries to use the specified delta encoding order, if possible.

static try_conv1(order)
Returns:

a DeltaSpec that tries to use 1D convolutions (equivalent to LPC) of the specified order, if possible.

static try_lookback()
Returns:

a DeltaSpec that tries to use delta lookbacks, if possible.

class pcodec.ModeSpec
static auto()
Returns:

a ModeSpec that automatically detects a good mode.

static classic()
Returns:

a ModeSpec that always uses the simplest mode.

static try_dict()
Returns:

a ModeSpec that tries to use Dict mode, if possible.

static try_float_mult(base)
Returns:

a ModeSpec that tries to use FloatMult mode with the given base, if possible.

static try_float_quant(k)
Returns:

a ModeSpec that tries to use FloatQuant mode with the given shift, if possible.

static try_int_mult(base)
Returns:

a ModeSpec that tries to use IntMult mode with the given base, if possible.

class pcodec.PagingSpec
static equal_pages_up_to(n)
Returns:

a PagingSpec configuring a roughly count of numbers in each page.

static exact_page_sizes(sizes)
Returns:

a PagingSpec with the exact, provided count of numbers in each page.

class pcodec.Progress
finished

whether the compressed data was finished.

n_processed

count of decompressed numbers.