numcodecs-wasm-sz3 0.3.0.dev0__tar.gz → 0.3.0.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {numcodecs_wasm_sz3-0.3.0.dev0 → numcodecs_wasm_sz3-0.3.0.dev1}/PKG-INFO +2 -2
- {numcodecs_wasm_sz3-0.3.0.dev0 → numcodecs_wasm_sz3-0.3.0.dev1}/pyproject.toml +2 -2
- numcodecs_wasm_sz3-0.3.0.dev1/src/numcodecs_wasm_sz3/__init__.py +15 -0
- numcodecs_wasm_sz3-0.3.0.dev1/src/numcodecs_wasm_sz3/__init__.pyi +113 -0
- {numcodecs_wasm_sz3-0.3.0.dev0 → numcodecs_wasm_sz3-0.3.0.dev1}/src/numcodecs_wasm_sz3/codec.wasm +0 -0
- numcodecs_wasm_sz3-0.3.0.dev1/src/numcodecs_wasm_sz3/py.typed +0 -0
- {numcodecs_wasm_sz3-0.3.0.dev0 → numcodecs_wasm_sz3-0.3.0.dev1}/src/numcodecs_wasm_sz3.egg-info/PKG-INFO +2 -2
- {numcodecs_wasm_sz3-0.3.0.dev0 → numcodecs_wasm_sz3-0.3.0.dev1}/src/numcodecs_wasm_sz3.egg-info/SOURCES.txt +2 -0
- numcodecs_wasm_sz3-0.3.0.dev1/src/numcodecs_wasm_sz3.egg-info/requires.txt +1 -0
- numcodecs_wasm_sz3-0.3.0.dev0/src/numcodecs_wasm_sz3/__init__.py +0 -13
- numcodecs_wasm_sz3-0.3.0.dev0/src/numcodecs_wasm_sz3.egg-info/requires.txt +0 -1
- {numcodecs_wasm_sz3-0.3.0.dev0 → numcodecs_wasm_sz3-0.3.0.dev1}/LICENSE +0 -0
- {numcodecs_wasm_sz3-0.3.0.dev0 → numcodecs_wasm_sz3-0.3.0.dev1}/README.md +0 -0
- {numcodecs_wasm_sz3-0.3.0.dev0 → numcodecs_wasm_sz3-0.3.0.dev1}/setup.cfg +0 -0
- {numcodecs_wasm_sz3-0.3.0.dev0 → numcodecs_wasm_sz3-0.3.0.dev1}/src/numcodecs_wasm_sz3.egg-info/dependency_links.txt +0 -0
- {numcodecs_wasm_sz3-0.3.0.dev0 → numcodecs_wasm_sz3-0.3.0.dev1}/src/numcodecs_wasm_sz3.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: numcodecs_wasm_sz3
|
|
3
|
-
Version: 0.3.0.
|
|
3
|
+
Version: 0.3.0.dev1
|
|
4
4
|
Summary: numcodecs-sz3 compression codec compiled to WebAssembly
|
|
5
5
|
Author-email: Juniper Tyree <juniper.tyree@helsinki.fi>
|
|
6
6
|
Maintainer-email: Juniper Tyree <juniper.tyree@helsinki.fi>
|
|
@@ -382,7 +382,7 @@ License: Copyright (c) 2024-2025, Juniper Tyree
|
|
|
382
382
|
|
|
383
383
|
Requires-Python: >=3.10
|
|
384
384
|
Description-Content-Type: text/markdown
|
|
385
|
-
Requires-Dist: numcodecs-wasm==0.1.0.
|
|
385
|
+
Requires-Dist: numcodecs-wasm==0.1.0.dev1
|
|
386
386
|
|
|
387
387
|
[![CI Status]][workflow]
|
|
388
388
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "numcodecs_wasm_sz3"
|
|
7
|
-
version = "0.3.0.
|
|
7
|
+
version = "0.3.0.dev1"
|
|
8
8
|
description = "numcodecs-sz3 compression codec compiled to WebAssembly"
|
|
9
9
|
|
|
10
10
|
authors = [{ name = "Juniper Tyree", email = "juniper.tyree@helsinki.fi" }]
|
|
@@ -16,7 +16,7 @@ license = { file = "LICENSE" }
|
|
|
16
16
|
requires-python = ">=3.10"
|
|
17
17
|
|
|
18
18
|
dependencies = [
|
|
19
|
-
"numcodecs-wasm==0.1.0.
|
|
19
|
+
"numcodecs-wasm==0.1.0.dev1", # wasi 0.2.2
|
|
20
20
|
]
|
|
21
21
|
|
|
22
22
|
[tool.setuptools.packages.find]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
__all__ = ["Sz3"]
|
|
2
|
+
|
|
3
|
+
import importlib.resources
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
from numcodecs_wasm import WasmCodecMeta
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Sz3(
|
|
10
|
+
metaclass=WasmCodecMeta,
|
|
11
|
+
wasm=importlib.resources.files(
|
|
12
|
+
sys.modules[__name__]
|
|
13
|
+
).joinpath("codec.wasm").read_bytes(),
|
|
14
|
+
):
|
|
15
|
+
pass
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
__all__ = ['Sz3']
|
|
2
|
+
|
|
3
|
+
import numcodecs.abc
|
|
4
|
+
|
|
5
|
+
class Sz3(numcodecs.abc.Codec):
|
|
6
|
+
r"""
|
|
7
|
+
Codec providing compression using SZ3
|
|
8
|
+
|
|
9
|
+
Parameters
|
|
10
|
+
----------
|
|
11
|
+
eb_mode : ...
|
|
12
|
+
- "abs-and-rel": Errors are bounded by *both* the absolute and relative error, i.e. by
|
|
13
|
+
whichever bound is stricter
|
|
14
|
+
|
|
15
|
+
- "abs-or-rel": Errors are bounded by *either* the absolute or relative error, i.e. by
|
|
16
|
+
whichever bound is weaker
|
|
17
|
+
|
|
18
|
+
- "abs": Absolute error bound
|
|
19
|
+
|
|
20
|
+
- "rel": Relative error bound
|
|
21
|
+
|
|
22
|
+
- "psnr": Peak signal to noise ratio error bound
|
|
23
|
+
|
|
24
|
+
- "l2": Peak L2 norm error bound
|
|
25
|
+
eb_abs : ..., optional
|
|
26
|
+
Absolute error bound
|
|
27
|
+
eb_l2 : ..., optional
|
|
28
|
+
Peak L2 norm error bound
|
|
29
|
+
eb_psnr : ..., optional
|
|
30
|
+
Peak signal to noise ratio error bound
|
|
31
|
+
eb_rel : ..., optional
|
|
32
|
+
Relative error bound
|
|
33
|
+
encoder : ..., optional, default = "huffman"
|
|
34
|
+
Encoder
|
|
35
|
+
lossless : ..., optional, default = "zstd"
|
|
36
|
+
Lossless compressor
|
|
37
|
+
predictor : ..., optional, default = "cubic-interpolation-lorenzo"
|
|
38
|
+
Predictor
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def __init__(self, eb_mode, eb_abs=None, eb_l2=None, eb_psnr=None, eb_rel=None, encoder='huffman', lossless='zstd', predictor='cubic-interpolation-lorenzo'): ...
|
|
42
|
+
|
|
43
|
+
codec_id = 'sz3'
|
|
44
|
+
|
|
45
|
+
def decode(self, buf, out=None):
|
|
46
|
+
r"""
|
|
47
|
+
Decode the data in `buf`.
|
|
48
|
+
|
|
49
|
+
Parameters
|
|
50
|
+
----------
|
|
51
|
+
buf : Buffer
|
|
52
|
+
Encoded data. May be any object supporting the new-style buffer
|
|
53
|
+
protocol.
|
|
54
|
+
out : Buffer, optional
|
|
55
|
+
Writeable buffer to store decoded data. N.B. if provided, this buffer must
|
|
56
|
+
be exactly the right size to store the decoded data.
|
|
57
|
+
|
|
58
|
+
Returns
|
|
59
|
+
-------
|
|
60
|
+
dec : Buffer
|
|
61
|
+
Decoded data. May be any object supporting the new-style
|
|
62
|
+
buffer protocol.
|
|
63
|
+
"""
|
|
64
|
+
...
|
|
65
|
+
|
|
66
|
+
def encode(self, buf):
|
|
67
|
+
r"""
|
|
68
|
+
Encode the data in `buf`.
|
|
69
|
+
|
|
70
|
+
Parameters
|
|
71
|
+
----------
|
|
72
|
+
buf : Buffer
|
|
73
|
+
Data to be encoded. May be any object supporting the new-style
|
|
74
|
+
buffer protocol.
|
|
75
|
+
|
|
76
|
+
Returns
|
|
77
|
+
-------
|
|
78
|
+
enc : Buffer
|
|
79
|
+
Encoded data. May be any object supporting the new-style buffer
|
|
80
|
+
protocol.
|
|
81
|
+
"""
|
|
82
|
+
...
|
|
83
|
+
|
|
84
|
+
@staticmethod
|
|
85
|
+
def from_config(cls, config):
|
|
86
|
+
r"""
|
|
87
|
+
Instantiate the codec from a configuration [`dict`][dict].
|
|
88
|
+
|
|
89
|
+
Parameters
|
|
90
|
+
----------
|
|
91
|
+
config : dict
|
|
92
|
+
Configuration of the codec.
|
|
93
|
+
|
|
94
|
+
Returns
|
|
95
|
+
-------
|
|
96
|
+
codec : Self
|
|
97
|
+
Instantiated codec.
|
|
98
|
+
"""
|
|
99
|
+
...
|
|
100
|
+
|
|
101
|
+
def get_config(self):
|
|
102
|
+
r"""
|
|
103
|
+
Returns the configuration of the codec.
|
|
104
|
+
|
|
105
|
+
[`numcodecs.registry.get_codec(config)`][numcodecs.registry.get_codec]
|
|
106
|
+
can be used to reconstruct this codec from the returned config.
|
|
107
|
+
|
|
108
|
+
Returns
|
|
109
|
+
-------
|
|
110
|
+
config : dict
|
|
111
|
+
Configuration of the codec.
|
|
112
|
+
"""
|
|
113
|
+
...
|
{numcodecs_wasm_sz3-0.3.0.dev0 → numcodecs_wasm_sz3-0.3.0.dev1}/src/numcodecs_wasm_sz3/codec.wasm
RENAMED
|
Binary file
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: numcodecs_wasm_sz3
|
|
3
|
-
Version: 0.3.0.
|
|
3
|
+
Version: 0.3.0.dev1
|
|
4
4
|
Summary: numcodecs-sz3 compression codec compiled to WebAssembly
|
|
5
5
|
Author-email: Juniper Tyree <juniper.tyree@helsinki.fi>
|
|
6
6
|
Maintainer-email: Juniper Tyree <juniper.tyree@helsinki.fi>
|
|
@@ -382,7 +382,7 @@ License: Copyright (c) 2024-2025, Juniper Tyree
|
|
|
382
382
|
|
|
383
383
|
Requires-Python: >=3.10
|
|
384
384
|
Description-Content-Type: text/markdown
|
|
385
|
-
Requires-Dist: numcodecs-wasm==0.1.0.
|
|
385
|
+
Requires-Dist: numcodecs-wasm==0.1.0.dev1
|
|
386
386
|
|
|
387
387
|
[![CI Status]][workflow]
|
|
388
388
|
|
|
@@ -2,7 +2,9 @@ LICENSE
|
|
|
2
2
|
README.md
|
|
3
3
|
pyproject.toml
|
|
4
4
|
src/numcodecs_wasm_sz3/__init__.py
|
|
5
|
+
src/numcodecs_wasm_sz3/__init__.pyi
|
|
5
6
|
src/numcodecs_wasm_sz3/codec.wasm
|
|
7
|
+
src/numcodecs_wasm_sz3/py.typed
|
|
6
8
|
src/numcodecs_wasm_sz3.egg-info/PKG-INFO
|
|
7
9
|
src/numcodecs_wasm_sz3.egg-info/SOURCES.txt
|
|
8
10
|
src/numcodecs_wasm_sz3.egg-info/dependency_links.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
numcodecs-wasm==0.1.0.dev1
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
__all__ = ["Sz3"]
|
|
2
|
-
|
|
3
|
-
import importlib.resources
|
|
4
|
-
import sys
|
|
5
|
-
|
|
6
|
-
from numcodecs_wasm import WasmCodecMeta
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
with importlib.resources.as_file(
|
|
10
|
-
importlib.resources.files(sys.modules[__name__]).joinpath("codec.wasm")
|
|
11
|
-
) as wasm:
|
|
12
|
-
class Sz3(metaclass=WasmCodecMeta, wasm=wasm):
|
|
13
|
-
pass
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
numcodecs-wasm==0.1.0.dev0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|