1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
//! The `zfpy` array to bytes codec (Experimental).
//!
//! <div class="warning">
//! This codec is experimental and may be incompatible with other Zarr V3 implementations.
//! </div>
//!
//! [zfp](https://zfp.io/) 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](https://zfp.readthedocs.io/en/release1.0.1/low-level-api.html#utility-functions).
//!
//! This codec requires the `zfp` feature, which is disabled by default.
//!
//! ### Compatible Implementations
//! This codec is fully compatible with the `numcodecs.zfpy` codec in `zarr-python`.
//!
//! ### Specification
//! - <https://github.com/zarr-developers/zarr-extensions/tree/numcodecs/codecs/numcodecs.zfpy>
//! - <https://codec.zarrs.dev/array_to_bytes/zfpy>
//!
//! ### Codec `name` Aliases (Zarr V3)
//! - `numcodecs.zfpy`
//! - `https://codec.zarrs.dev/array_to_bytes/zfpy`
//!
//! ### Codec `id` Aliases (Zarr V2)
//! - `zfpy`
//!
//! ### Codec `configuration` Example - [`ZfpyCodecConfiguration`]:
//! #### Encode in fixed rate mode with 10.5 compressed bits per value
//! ```rust
//! # let JSON = r#"
//! {
//! "mode": 2,
//! "rate": 10.5
//! }
//! # "#;
//! # use zarrs::metadata_ext::codec::zfpy::ZfpyCodecConfiguration;
//! # let configuration: ZfpyCodecConfiguration = serde_json::from_str(JSON).unwrap();
//! ```
//!
//! #### Encode in fixed precision mode with 19 uncompressed bits per value
//! ```rust
//! # let JSON = r#"
//! {
//! "mode": 3,
//! "precision": 19
//! }
//! # "#;
//! # use zarrs::metadata_ext::codec::zfpy::ZfpyCodecConfiguration;
//! # let configuration: ZfpyCodecConfiguration = serde_json::from_str(JSON).unwrap();
//! ```
//!
//! #### Encode in fixed accuracy mode with a tolerance of 0.05
//! ```rust
//! # let JSON = r#"
//! {
//! "mode": 4,
//! "tolerance": 0.05
//! }
//! # "#;
//! # use zarrs::metadata_ext::codec::zfpy::ZfpyCodecConfiguration;
//! # let configuration: ZfpyCodecConfiguration = serde_json::from_str(JSON).unwrap();
//! ```
use Arc;
use MetadataV2;
use MetadataV3;
use PluginCreateError;
use ;
pub use ;
pub use ZfpyCodec;
impl_extension_aliases!;
// Register the V3 codec.
submit!
// Register the V2 codec.
submit!