Skip to main content

Module zfp

Module zfp 

Source
Available on crate feature zfp only.
Expand description

The zfp array to bytes codec.

This is a registered codec that originated in `zarrs`. It may not be supported by other Zarr V3 implementations.

zfp is a compressed number format for 1D to 4D arrays of 32/64-bit floating point or integer data. 8/16-bit integer types are supported through promotion to 32-bit in accordance with the zfp utility functions.

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

§Compatible Implementations

None

§Specification:

This codec is similar to numcodecs.zfpy with the following except:

  • "mode"s are specified as strings
  • reversible mode and expert mode are supported
  • a zfp header is not written, as it is redundant with the codec metadata

§Codec name Aliases (Zarr V3)

  • zfp
  • zarrs.zfp
  • https://codec.zarrs.dev/array_to_bytes/zfp

§Codec id Aliases (Zarr V2)

None

§Codec configuration Examples - ZfpCodecConfiguration:

§Encode in fixed rate mode with 10.5 compressed bits per value
{
    "mode": "fixed_rate",
    "rate": 10.5
}
§Encode in fixed precision mode with 19 uncompressed bits per value
{
    "mode": "fixed_precision",
    "precision": 19
}
§Encode in fixed accuracy mode with a tolerance of 0.05
{
    "mode": "fixed_accuracy",
    "tolerance": 0.05
}
§Encode in reversible mode
{
    "mode": "reversible"
}
§Encode in expert mode
{
    "mode": "expert",
    "minbits": 1,
    "maxbits": 13,
    "maxprec": 19,
    "minexp": -2
}

Structs§

ZfpCodec
A zfp codec implementation.
ZfpCodecConfigurationV1
zfp codec configuration parameters (version 1.0 draft).
ZfpDataTypePlugin
Plugin for registering zfp codec support for a data type.

Enums§

ZfpCodecConfiguration
A wrapper to handle various versions of zfp codec configuration parameters.
ZfpEncoding
The zfp encoding strategy for a data type.
ZfpMode
The zfp mode.
ZfpNativeType
The native zfp type for the zfp library.

Traits§

ZfpDataTypeExt
Extension trait for DataType to access ZfpDataTypeTraits.
ZfpDataTypeTraits
Traits for a data type supporting the zfp codec.