A universal C++ compression library based on wavelet transformation
Project description
wavelet-buffer
A python wrapper for WaveletBuffer Framework
Install from PyPI
pip install wavelet-buffer
Install from repo
pip install git+https://github.com/panda-official/WaveletBuffer.git#subdirectory=python
Examples
import numpy as np
from wavelet_buffer import WaveletBuffer, WaveletType, denoise
signal = np.sin(np.linspace(0, np.pi, 100) * 10)
print(f"Original signal: {signal[0:10]}")
buffer = WaveletBuffer(signal_shape=signal.shape, signal_number=1,
decomposition_steps=2, wavelet_type=WaveletType.DB3)
# Denoise and serialize data
buffer.decompose(signal, denoise.Threshold(0, 0.05))
arch = buffer.serialize(compression_level=16)
print(f"Size of archive: {len(arch)} bytes")
# Restore data from archive
buffer: WaveletBuffer = WaveletBuffer.parse(arch)
restored_signal = buffer.compose()
print(f"Restored signal: {restored_signal[0:10]}")
for more examples please check examples/
folder
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wavelet-buffer-0.1.0.tar.gz
(12.4 kB
view hashes)
Built Distributions
Close
Hashes for wavelet_buffer-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82a79f8380fdead9d962e19c6c9b4a965c6f8380c7d0c6e55f935cce00708545 |
|
MD5 | 8df943d5ccdea9e5b6984d97b711c909 |
|
BLAKE2b-256 | 2e6e70fc805f1b9cb14dd7a2464a9b91b1d21cdfe13aed21a9c39c165460ca4d |
Close
Hashes for wavelet_buffer-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7888024d075c158f85ca059012b217c5a4eded9ba4581ca30da355dab3a6a23a |
|
MD5 | 09ac7df37fea48cd91153633d7b825f1 |
|
BLAKE2b-256 | 770536cc96802df14e9038e0cce3b7ed930fbb4cfafe8197a6dc64d0217e7b86 |
Close
Hashes for wavelet_buffer-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dd8b6985a0faec90a823f47c92aee0bbf5b243cec9132fa1b17c1627c3604c3 |
|
MD5 | b5f7f8cc81e3005fcc2a16b8481626ed |
|
BLAKE2b-256 | 47affdcf931021d0fea0ec4b700f5f7cab3b818e6f002d1d204c314af3214598 |