14 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.
PYMECompress
Compression for photon-noise limited images which keeps losses within the Poisson noise envelope
PYMECompress consists of four parts:
-
a fork of the Basic Compression Library originally by Marcus Geelnard, modified to include a heavily optimized huffman coder (BCL license is avalable under pymecompress/bcl/doc/manual.pdf and would appear to be BSD compatible)
-
a fast, AVX optimized, quantizer to perform "within noise level" quantization of photon-limited images
-
a python wrapper of the above. Note that at this point, only huffman coding and quantization are exposed to python
-
numcodecs codecs (experimental) to permit simple usage with other IO packages - e.g. Zarr
Together they offer a single core throughput of ~500 -600MB/s
Installation
conda
Prebuilt binaries of PYMEcompress are available as a conda package (pymecompress) on the david_baddeley conda channel for python 2.7, 3.6 & 3.7, and installable via:
conda install -c david_baddeley pymecompress
source
If you want to modify/contribute to the package you will have to build from source.
Because we use gcc compiler extensions for avx opcodes, we must use gcc/clang for compilation, regardless of platform.
On OSX / linux, a standard python setup.py install or python setup.py develop should work.
On Windows, you need to install mingw and run the build step first so that you can pass the compiler flag to python setup.py build - i.e. :
python setup.py build --compiler=mingw32
python setup.py install
A suitable environment for building pymecompress can be created using the following conda command conda create -n <name> python=x.x numpy cython libpython m2w64-toolchain
pip
Installation via pip is also available:
pip install pymecompress
although binary wheels are not available for all platforms so you may need to set up a build environment (gcc/mingw, as described for source installation) first.
Usage
numcodecs codecs
import numpy as np
from pymecompress import codecs
# vanilla huffman coding (lossless). NB - input buffer must be bytes/uint8
huff = codecs.Huffman()
d = np.ones(1000)
assert np.allclose(huff.decode(huff.encode(d.view('uint8'))).view(d.dtype), d)
# with quantisation NB: input data type MUST be uint16
huffq = codecs.HuffmanQuant16(offset=0, scale=1.0)
ds = np.linspace(1,2**15).astype('uint16')
assert np.all((huffq.decode(huffq.encode(ds)) - ds.astype('f')) < np.sqrt(ds))
As a Zarr compression filter
VERY EXPERIMENTAL!
This is not yet well tested, but should work as described in https://zarr.readthedocs.io/en/stable/api/codecs.html. In brief ...
import zarr
from pymecompress import codecs
z = zarr.zeros(1000000, dtype='uint16', compressor=codecs.HuffmanQuant16(offset=0, scale=1))
NB To be able to read/open files saved using the pymecompress codecs you will probably need to run from pymecompress import codecs
to register the codecs with numcodecs before trying to open the file.
Directly calling functions
As you need to supply the original size to the decompression function, these are most suitable when putting the compressed data in an external wrapper e.g. PYMEs' PZFFormat which keeps track of the original data dimensions and dtype (we save a couple of bytes and a seek over using the codec versions above).
import numpy as np
import pymecompress
data = np.linspace(1,2**15).astype('uint16')
nbytes = data.nbytes
c = pymecompress.HuffmanCompressQuant(data, quantizationOffset, quantizationScale).to_string()
decompressed = pymecompress.HuffmanDecompress(np.fromstring(c, 'u1'), nbytes)
dequantized = (quantisationScale*decompressed)**2 + quantizationOffset
Metadata
Release files for pymecompress 0.3.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Files added late
14 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pymecompress-0.3.6.tar.gz | 156.8 kB | Without provenance | Details for pymecompress-0.3.6.tar.gz |
Built distributions (wheels)
Total release size: 2.7 MB
Release files / pymecompress-0.3.6.tar.gz
| Download URL | pymecompress-0.3.6.tar.gz |
|---|---|
| Size | 156.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc13a7ed0b19edf3367ab2de5ef7fb3b28791c91fae7409d8a5fe70ae7596de7
|
|
BLAKE2b-256 checksum How to use checksums |
af4f943f13b22fbd392dc5fd2052ca45d99ddbe2662823dd0e6456b5322f7331
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / pymecompress-0.3.6-cp313-cp313-win_amd64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pymecompress-0.3.6-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 129.3 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1ee65f55c00015b8b8c9f7f2adf695ccc1de097b78c8823e3efb41abfd233a78
|
|
BLAKE2b-256 checksum How to use checksums |
86d6f12ec986d5ecd24fc1df1c1fab6919acbf9df4a68578a5739da863402154
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / pymecompress-0.3.6-cp313-cp313-macosx_15_0_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pymecompress-0.3.6-cp313-cp313-macosx_15_0_x86_64.whl |
|---|---|
| Size | 84.1 kB |
| Tags | CPython 3.13 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
0653e05c28303c916dcc9029f7c331c550a7c941849f1dce9efd76f5e708f30a
|
|
BLAKE2b-256 checksum How to use checksums |
e0c0f8c13aa51583cda52389a98c76f2c15c969c616da65be572849b122f26d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / pymecompress-0.3.6-cp313-cp313-macosx_15_0_arm64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pymecompress-0.3.6-cp313-cp313-macosx_15_0_arm64.whl |
|---|---|
| Size | 77.7 kB |
| Tags | CPython 3.13 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
549bdeccb7ac1fb81c7b6bf12bcb8bca501894624d3e85f62ee092d129fa0db4
|
|
BLAKE2b-256 checksum How to use checksums |
2f1d3bf85164c7406980a1d421032e5a550309c3c4fa567df0a07cf1d1236f9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / pymecompress-0.3.6-cp312-cp312-win_amd64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pymecompress-0.3.6-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 129.4 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
38f5fb9edd68dcb29a9d172ccc058da61a85edef9799e0a866de8a288c63fd30
|
|
BLAKE2b-256 checksum How to use checksums |
3a782ac29001fa44b181d2f97d6ee45c509eea00d2da268001fe91765ee7676a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / pymecompress-0.3.6-cp312-cp312-macosx_15_0_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pymecompress-0.3.6-cp312-cp312-macosx_15_0_x86_64.whl |
|---|---|
| Size | 84.8 kB |
| Tags | CPython 3.12 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
41430468df4639a42a860351ca5b2872c6e17798633decd84f37748f440b29af
|
|
BLAKE2b-256 checksum How to use checksums |
1c2d740b777218118243dd5beef4cf99feb9d9681287c19de6a0e875fcd008e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / pymecompress-0.3.6-cp312-cp312-macosx_15_0_arm64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pymecompress-0.3.6-cp312-cp312-macosx_15_0_arm64.whl |
|---|---|
| Size | 78.4 kB |
| Tags | CPython 3.12 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ef54ff0aff96017d2a5d401e3d04f4e0c15fd3e0f86918f756dd39662b464c0e
|
|
BLAKE2b-256 checksum How to use checksums |
0a54a05d14f5d6390df4bcb5c32b7eddcc0a63184257e2f842902c1a234a8445
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / pymecompress-0.3.6-cp311-cp311-win_amd64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pymecompress-0.3.6-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 131.9 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
dd9186462b2c9d0b56715d395054c4a09a1e8d13a2e9214f90a0cd5dbd6749c2
|
|
BLAKE2b-256 checksum How to use checksums |
d53960624b03543340e59cf3efb8628d65bd46180dd05374ccb6a2b8ec93e8a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / pymecompress-0.3.6-cp311-cp311-macosx_15_0_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pymecompress-0.3.6-cp311-cp311-macosx_15_0_x86_64.whl |
|---|---|
| Size | 83.8 kB |
| Tags | CPython 3.11 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
de9e22f000768dc414682c10436471fc8dcfc3580e9dfdb16d4b77e8fa4bd214
|
|
BLAKE2b-256 checksum How to use checksums |
3c88d0753f78cf56a5a8514fd1e0285bbaeb9ff3b44acaf00845325f072900e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / pymecompress-0.3.6-cp311-cp311-macosx_15_0_arm64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pymecompress-0.3.6-cp311-cp311-macosx_15_0_arm64.whl |
|---|---|
| Size | 77.5 kB |
| Tags | CPython 3.11 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4df4757a06929b95c6b3b1ec260315a9ceb33e450ba88f460cfe2be8aa158969
|
|
BLAKE2b-256 checksum How to use checksums |
20d35ba5c4dd9597b34295691d6efcffde0eabfe62d49ae24c03664b5ab7cd2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / pymecompress-0.3.6-cp311-cp311-macosx_12_0_x86_64.whl
| Download URL | pymecompress-0.3.6-cp311-cp311-macosx_12_0_x86_64.whl |
|---|---|
| Size | 93.1 kB |
| Tags | CPython 3.11 macOS 12.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
9522737bb04f7ff00e946eb22b65d34fe0c86061949d92d79668df82517a30ce
|
|
BLAKE2b-256 checksum How to use checksums |
1d12d44f4e54e8660025cac12e83811a3f52cd9bc605f4ccdf88f038536d8bd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / pymecompress-0.3.6-cp310-cp310-win_amd64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pymecompress-0.3.6-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 131.0 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
aaa9976473ba9687b0a8057192060973688e3e9edcabb492674d3ac9f20a4677
|
|
BLAKE2b-256 checksum How to use checksums |
68313190dbea0fdd6b617f4484d20acc00f254d04c80c9f8119fb96c99f5e2a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / pymecompress-0.3.6-cp310-cp310-macosx_15_0_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pymecompress-0.3.6-cp310-cp310-macosx_15_0_x86_64.whl |
|---|---|
| Size | 83.9 kB |
| Tags | CPython 3.10 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
9f7003d6a449d3fb8d769462ea0d94f61527854d48e59830bbc25e7817c05a70
|
|
BLAKE2b-256 checksum How to use checksums |
d74442e2f4093af08f86a18bdf8febfe741c1afd9703314af89b4b8224ab0f17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / pymecompress-0.3.6-cp310-cp310-macosx_15_0_arm64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pymecompress-0.3.6-cp310-cp310-macosx_15_0_arm64.whl |
|---|---|
| Size | 77.9 kB |
| Tags | CPython 3.10 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d06a69d64a4d534b6124f73f9eb212b6702bbd9e1a73e3bc44db10c0f88dc429
|
|
BLAKE2b-256 checksum How to use checksums |
004a9e497ab586c7f46be4c51d1905fe9a297d4ad420a77001815777055a594a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / pymecompress-0.3.6-cp39-cp39-win_amd64.whl
| Download URL | pymecompress-0.3.6-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 399.4 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3057288db6dea9c2c543fe03aa9462ac55c3934179bf26fd99a8bc9a6312e554
|
|
BLAKE2b-256 checksum How to use checksums |
2909f2991948bd1568569f3cd3f73fdd46aaea03dfb630c818da6dc02a6744c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / pymecompress-0.3.6-cp39-cp39-macosx_15_0_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pymecompress-0.3.6-cp39-cp39-macosx_15_0_x86_64.whl |
|---|---|
| Size | 84.3 kB |
| Tags | CPython 3.9 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
513251461ea5bfc42061cc270da31e63cfd99f471d25c4923450b8b0a85e8d5e
|
|
BLAKE2b-256 checksum How to use checksums |
45cab5b2184fc07f9ce72c557e79d00c172a91a2670dc003430f990fd164c63e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.13
|
Release files / pymecompress-0.3.6-cp39-cp39-macosx_15_0_arm64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pymecompress-0.3.6-cp39-cp39-macosx_15_0_arm64.whl |
|---|---|
| Size | 78.2 kB |
| Tags | CPython 3.9 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
bd9a2917761ffbd6ccb0edebca8ca46c95aa78de811325245c0e8bd8b0f330c7
|
|
BLAKE2b-256 checksum How to use checksums |
2a5277b8efbb1cadaa341255424ea418d958ab97d9250582efa7251d21415206
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.13
|
Release files / pymecompress-0.3.6-cp38-cp38-win_amd64.whl
| Download URL | pymecompress-0.3.6-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 414.6 kB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fd1f2a117e5826ab8056b9c804c7d3d0978646e008ec5ca59090f61e1b4726ec
|
|
BLAKE2b-256 checksum How to use checksums |
cdb12515aed765238db841e9e135480dbf5adce27c35dabcce1548a79634580f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.17
|
Release files / pymecompress-0.3.6-cp37-cp37m-win_amd64.whl
| Download URL | pymecompress-0.3.6-cp37-cp37m-win_amd64.whl |
|---|---|
| Size | 349.0 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f22505e38c46ef51c18094a128452bd8bb2ccdebc687c7b9ce90345cee4889ba
|
|
BLAKE2b-256 checksum How to use checksums |
fa496a0a58bf13fa237d148b36e96b66953e6ba03144ae5acb83979646a081ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.7.16
|
Security for pymecompress 0.3.6
Upload timing
Files added late
14 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.