Crates.io | numpress |
lib.rs | numpress |
version | 1.1.0 |
source | src |
created_at | 2018-10-28 19:37:01.49829 |
updated_at | 2018-11-20 19:08:50.467766 |
description | A pure rust implementation of ms-numpress, a fast, minimally lossy compression algorithm for mass spectrometry data. |
homepage | |
repository | https://github.com/AlexHuszagh/numpress |
max_upload_size | |
id | 93167 |
size | 36,938 |
A pure rust implementation of ms-numpress, a fast, minimally lossy compression algorithm for mass spectrometry data.
// Compress floats to bytes
let floats: Vec<f64> = vec![100., 101., 102., 103.];
let compressed: Vec<u8> = numpress_compress(&decoded, DEFAULT_SCALING)?;
// Decompress floats from bytes.
let decompressed: Vec<f64> = numpress_decompress(&compressed)?;
Numpress's documentation can be found on docs.rs.
Numpress is available on crates.io. Use the following in Cargo.toml:
[dependencies]
numpress = "1.0"
Like the original ms-numpress implementation, this code is open source. It is dual licensed under the Apache 2.0 license as well as the 3-clause BSD license. See the LICENCE-BSD and the LICENCE-APACHE files for the licenses.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in numpress by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.