Skip to main content

Module bitround

Module bitround 

Source
Available on crate feature bitround only.
Expand description

The bitround array to array codec.

Round the mantissa of floating point data types to the specified number of bits. Rounds integers from the most significant set bit. Bit rounding leaves an array more amenable to compression.

This codec requires the bitround feature, which is disabled by default.

§Compatible Implementations

This codec is fully compatible with the numcodecs.bitround codec in zarr-python. However, it supports additional data types not supported by that implementation.

§Specification

§Codec name Aliases (Zarr V3)

  • bitround
  • numcodecs.bitround
  • https://codec.zarrs.dev/array_to_array/bitround

§Codec id Aliases (Zarr V2)

  • bitround

§Codec configuration Example - BitroundCodecConfiguration:

{
    "keepbits": 10
}

Structs§

BitroundCodec
A bitround codec implementation.
BitroundCodecConfigurationV1
bitround codec configuration parameters (version 1.0 draft).
BitroundDataTypePlugin
Plugin for registering bitround codec support for a data type.

Enums§

BitroundCodecConfiguration
A wrapper to handle various versions of bitround codec configuration parameters.

Traits§

BitroundDataTypeExt
Extension trait for DataType to access BitroundDataTypeTraits.
BitroundDataTypeTraits
Traits for a data type supporting the bitround codec.

Functions§

round_bytes_float16
Helper to round 16-bit float values (fixed mantissa bits).
round_bytes_float32
Helper to round 32-bit float values (fixed mantissa bits).
round_bytes_float64
Helper to round 64-bit float values (fixed mantissa bits).
round_bytes_int8
Helper to round 8-bit integer values (from MSB).
round_bytes_int16
Helper to round 16-bit integer values (from MSB).
round_bytes_int32
Helper to round 32-bit integer values (from MSB).
round_bytes_int64
Helper to round 64-bit integer values (from MSB).