numpress-rs 1.1.1

A pure rust implementation of ms-numpress, a fast, minimally lossy compression algorithm for mass spectrometry data.
Documentation
  • Coverage
  • 88%
    22 out of 25 items documented0 out of 18 items with examples
  • Size
  • Source code size: 53.8 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.77 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • mobiusklein/numpress-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mobiusklein

numpress-rs

A pure rust implementation of ms-numpress, a fast, minimally lossy compression algorithm for mass spectrometry data.

Note: This is a fork of https://github.com/Alexhuszagh/numpress, which only supported the linear encoding algorithm. This fork implements the short logged float encoding and positive integer encoding as well. It focuses on a Rust API, and removes parts of the original no_std/extern "C" interface due to changes in FFI safety recommendations that no longer hold.

Getting Started

// 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)?;

Documentation

Numpress's documentation can be found on docs.rs.

Dependency

Numpress is available on crates.io. Use the following in Cargo.toml:

[dependencies]
numpress-rs = "1.0"

License

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.

Contributing

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.