numcodecs_wasm_bit_round
Classes:
-
BitRound–Codec providing floating-point bit rounding.
BitRound
BitRound(keepbits, _version='1.0.0')
Codec providing floating-point bit rounding.
Drops the specified number of bits from the floating point mantissa, leaving an array that is more amenable to compression. The number of bits to keep should be determined by information analysis of the data to be compressed.
The approach is based on the paper by Klöwer et al. 2021 (https://www.nature.com/articles/s43588-021-00156-2).
| Parameters: |
|
|---|
Methods:
-
decode–Decode the data in
buf. -
encode–Encode the data in
buf. -
from_config–Instantiate the codec from a configuration
dict. -
get_config–Returns the configuration of the codec.
codec_id
class-attribute
instance-attribute
codec_id = 'bit-round.rs'
decode
decode(buf, out=None)
Decode the data in buf.
| Parameters: |
|
|---|
| Returns: |
|
|---|
encode
encode(buf)
Encode the data in buf.
| Parameters: |
|
|---|
| Returns: |
|
|---|
from_config
classmethod
from_config(config)
get_config
get_config()
Returns the configuration of the codec.
numcodecs.registry.get_codec(config)
can be used to reconstruct this codec from the returned config.
| Returns: |
|
|---|