bit_range 0.1.0

A small library for getting bits and ranges of bits from byte collections
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented2 out of 3 items with examples
  • Size
  • Source code size: 3.11 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.12 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
  • Documentation
  • iirelu/bit-range
    1 0 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • iirelu

bit-range

A small library for getting ranges of bits from collections of bytes.

Example

extern crate bit_range;

use bit_range::BitRange;

let vec = vec![0b0110_1101, 0b0011_0100];
let slice = [0b1101_1010, 0b0000_0010, 0b1111_1111];

println!("{:0b}", vec.get_bit_range(1..5));

assert_eq!(vec.get_bit_range(1..9), slice.get_bit_range(0..8));