Data Compression¶
The library comes with some basic data compression routines. They are helpful in simple use cases like:
compression of binary arrays
run length encoding
fixed length encoding of integers
These routines are primarily based on numpy arrays and bitarray based compressed bit arrays. This module doesn’t use JAX.
|
Computes run lengths of an array of integers |
|
Decodes run lengths to form an array of integers |
|
Encodes an array of integers to a bit array using a sign bit and a fixed number of bits per sample for magnitude |
|
Decodes an array of integers from a bit array using a sign bit and a fixed number of bits per sample for magnitude |
|
Returns the runs of 0s and 1s in a binary map |
|
Encodes a binary array into a bit array via run length encoding |
|
Decodes a binary array from a bit array via run length decoding |
|
Returns the compression ratio of binary array compression algorithm |
|
Returns the space saving ratio of binary array compression algorithm |