bitconv 0.1.4

A simple, zero-dependency, no_std compatible Rust equivalent to the C# BitConverter class.
Documentation
  • Coverage
  • 35.29%
    6 out of 17 items documented6 out of 11 items with examples
  • Size
  • Source code size: 20.21 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.73 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • inspier/bitconv
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • inspier

Current Crates.io Version docs-rs

bitconv

A simple, zero-dependency, no_std compatible Rust equivalent to the C# BitConverter class.

To add to your Cargo.toml:

bitconv = "0.1.4"

Example

use bitconv::{endian::{Big, Little, Native}, to_uint32};

fn main() {
    let buffer = [15, 0, 0, 0, 0, 16, 0, 255, 3, 0, 0, 202, 19];
    assert_eq!(261888, to_uint32::<Little>(&buffer, 6));
    assert_eq!(261888, to_uint32::<Native>(&buffer, 6));
    assert_eq!(16712448, to_uint32::<Big>(&buffer, 6));
}