A universal C++ compression library based on wavelet transformation
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
WaveletBuffer
A universal C++ compression library based on wavelet transformation
Requirements
- CMake >= 3.16
- C++17 compiler
- conan
Bindings
Build and Installing
On Ubuntu:
git clone https://github.com/panda-official/WaveletBuffer.git
mkdir build && cd build
cmake -DWB_BUILD_TESTS=ON -DWB_BUILD_BENCHMARKS=ON -DWB_BUILD_EXAMPLES=ON -DCODE_COVERAGE=ON ..
cmake --build . --target install
On MacOS:
git clone https://github.com/panda-official/WaveletBuffer.git
mkdir build && cd build
cmake -DWB_BUILD_TESTS=ON -DWB_BUILD_BENCHMARKS=ON -DWB_BUILD_EXAMPLES=ON -DCODE_COVERAGE=ON ..
cmake --build . --target install
On Windows:
git clone https://github.com/panda-official/WaveletBuffer.git
mkdir build && cd build
cmake -DWB_BUILD_TESTS=ON -DWB_BUILD_BENCHMARKS=ON -DWB_BUILD_EXAMPLES=ON -DCODE_COVERAGE=ON ..
cmake --build . --config Release --target install
Integration
Using cmake target
find_package(wavelet_buffer REQUIRED)
add_executable(program program.cpp)
target_link_libraries(program wavelet_buffer::wavelet_buffer)
# WaveletBuffer use blaze as linear algebra library which expects you to have a LAPACK library installed
# (it will still work without LAPACK and will not be reduced in functionality, but performance may be limited)
find_package(LAPACK REQUIRED)
target_link_libraries(program ${LAPACK_LIBRARIES})
Example
#include <wavelet_buffer/wavelet_buffer.h>
using drift::Signal1D;
using drift::WaveletBuffer;
using drift::WaveletParameters;
using drift::WaveletTypes;
using DenoiseAlgo = drift::ThresholdAbsDenoiseAlgorithm<float>;
int main() {
Signal1D original = blaze::generate(
1000, [](auto index) { return static_cast<float>(index % 100); });
std::cout << "Original size: " << original.size() * 4 << std::endl;
WaveletBuffer buffer(WaveletParameters{
.signal_shape = {original.size()},
.signal_number = 1,
.decomposition_steps = 3,
.wavelet_type = WaveletTypes::kDB1,
});
// Wavelet decomposition of the signal and denoising
buffer.Decompose(original, DenoiseAlgo(0, 0.3));
// Compress the buffer
std::string arch;
buffer.Serialize(&arch, 16);
std::cout << "Compressed size: " << arch.size() << std::endl;
// Decompress the buffer
auto restored_buffer = WaveletBuffer::Parse(arch);
Signal1D output_signal;
// Restore the signal from wavelet decomposition
restored_buffer->Compose(&output_signal);
std::cout << "Distance between original and restored signal: "
<< blaze::norm(original - output_signal) / original.size()
<< std::endl;
std::cout << "Compression rate: " << original.size() * 4. / arch.size() * 100
<< "%" << std::endl;
}
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wavelet-buffer-0.3.0.tar.gz.
File metadata
- Download URL: wavelet-buffer-0.3.0.tar.gz
- Upload date:
- Size: 45.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0526615ffbde72d9bb294b712caffd4f4a92d34d9c19aa01a29dd10f68287131
|
|
| MD5 |
205bd03536130034bce5ba66fea6c928
|
|
| BLAKE2b-256 |
f59dd169a58e66a2c3b61490775c5b2b609e1ac12e2adacd48d22c2abc0af3e9
|
File details
Details for the file wavelet_buffer-0.3.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: wavelet_buffer-0.3.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
025edac0af0b904622fc36fff3d5c81f8301cda1a28f1e43e6811b716e2cf98c
|
|
| MD5 |
5a148e2fb0e5af9b1ce7142bca01a6aa
|
|
| BLAKE2b-256 |
940a83c97192841227dfa15fb0b87273931c4c4cae064b1e76ea72874a85b924
|
File details
Details for the file wavelet_buffer-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: wavelet_buffer-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 701.5 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f50a1d636f4a5ca1c94b4291feed30e6c8d4550ee926ae50594fbb2bd0f4574
|
|
| MD5 |
cb6de80ad8f3c4db51828e54bbd448c5
|
|
| BLAKE2b-256 |
abf91a43236c9cf301a3354523023d44a782e237201850d07956d6ac0249a2bb
|
File details
Details for the file wavelet_buffer-0.3.0-cp310-cp310-macosx_10_9_x86_64.whl.
File metadata
- Download URL: wavelet_buffer-0.3.0-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 612.5 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3473484f3134c828445ce38cf3fb591d88bac398f98dd4d15cd01e6056b79ccb
|
|
| MD5 |
037cf5adde0c9cb49f801bc23c2609ca
|
|
| BLAKE2b-256 |
d6f4a0938a50d503bf8081540de37731b59995019deb2473375e0e75e79cd5f4
|
File details
Details for the file wavelet_buffer-0.3.0-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: wavelet_buffer-0.3.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4137e1646dee107d2d898a8f4dbeac51148fd361c4bec4b75f5ceb91872a0c5a
|
|
| MD5 |
a6e023fe2f39c4931c1bce85caccf211
|
|
| BLAKE2b-256 |
621ac283a3abaaaf22bed7bce785e0fa663aa66cd4c1f59aa3acabb0bdf39de2
|
File details
Details for the file wavelet_buffer-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: wavelet_buffer-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 701.7 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
279046dd16396034af236e17e7a67056f3217b3d540958a8cd98166a6515f5be
|
|
| MD5 |
c93af77d3a50d1e0d712ab9ec27855a2
|
|
| BLAKE2b-256 |
8680fc84925ea2e0da53d1505548ee23e83472db8d8eb72d7a358c9594cca7a6
|
File details
Details for the file wavelet_buffer-0.3.0-cp39-cp39-macosx_10_9_x86_64.whl.
File metadata
- Download URL: wavelet_buffer-0.3.0-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 612.6 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22ad0920f4299316b094af033a1333706a092f4d9a679ce167f0a9c0bdfd68e6
|
|
| MD5 |
fd238601bc0281b70a51b22a001c62ab
|
|
| BLAKE2b-256 |
e7227bdb0f9a1da425954079587e08cb079d6b9f11bf54be67b141bfc9e62718
|
File details
Details for the file wavelet_buffer-0.3.0-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: wavelet_buffer-0.3.0-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40a42403ed9fe7bec98f7bedfe44f6a727eb8a2753edd9d03ac66fd3392569ff
|
|
| MD5 |
c8bf3502d1f246f6d94cbb18a5675876
|
|
| BLAKE2b-256 |
40292df89fd5f948c2451546d3686bdd367a59b46be993d109b4f1521d42e86d
|
File details
Details for the file wavelet_buffer-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: wavelet_buffer-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 701.5 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89732766f10dcec6f81c3dfef65510c824aaf27a92dc1d22bd475881c117f7b1
|
|
| MD5 |
d4f3995da3d1b2659d44fdda573d062c
|
|
| BLAKE2b-256 |
7a605679081d50e0ec5808b63166701a7235849c27607e70ed7fcb1d86dc5bbb
|
File details
Details for the file wavelet_buffer-0.3.0-cp38-cp38-macosx_10_9_x86_64.whl.
File metadata
- Download URL: wavelet_buffer-0.3.0-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 612.5 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08ceb9cb7ff09461f92166597c9cd5450c5bb7563b01a641a091dcabd19d30e7
|
|
| MD5 |
569465964501212782748b01f02a02ce
|
|
| BLAKE2b-256 |
084fa8515d3e80b1833decf8e83c659378e9f1c49a7584c9e648d096cbb34c02
|