numcodecs_bitmap_index
numcodecs_bitmap_index
BitmapIndexCodec for the numcodecs buffer compression API.
Modules:
-
typing–Commonly used type variables.
Classes:
-
BitmapIndexCodec–Codec that uses bitmaps to encode the most frequent bitpatterns in the data
BitmapIndexCodec
Bases: Codec
Codec that uses bitmaps to encode the most frequent bitpatterns in the data and encodes any remaining values as-is.
A simple heuristic is used to only encode bitpatterns with bitmaps where the direct savings outweigh the costs. The codec can be configured to bound the number of bitmaps or scale the cost.
Encoding produces a 1D array of unsigned integers with the same itemsize as the original data.
| Parameters: |
|---|
Methods:
-
encode–Encode the data in
bufby replacing the most frequent bitpatterns -
decode–Decode the data in
buf. -
get_config–Returns the configuration of the codec.
encode
decode
get_config
get_config() -> dict
Returns the configuration of the codec.
numcodecs.registry.get_codec(config)
can be used to reconstruct this codec from the returned config.
| Returns: |
|
|---|