bit_range

Crates.iobit_range
lib.rsbit_range
version0.1.0
sourcesrc
created_at2015-08-29 04:12:02.720637
updated_at2015-12-11 23:56:18.321051
descriptionA small library for getting bits and ranges of bits from byte collections
homepage
repositoryhttps://github.com/iirelu/bit-range
max_upload_size
id2949
size2,960
Anna Harren (iirelu)

documentation

https://iirelu.github.io/bit-range/bit_range/

README

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));
Commit count: 2

cargo fmt