bitstr 0.1.2

BitStr is a contiguous sequence of bits in memory
Documentation
  • Coverage
  • 0%
    0 out of 30 items documented0 out of 28 items with examples
  • Size
  • Source code size: 269.07 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.3 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • raphamorim/bitstr
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • raphamorim

bitstr

bitstr is just that: a sequence of bytes. It isn't human-readable. Under the hood, everything must be converted to a byte string before it can be stored in a computer.

Which means that a bitstring is a contiguous sequence of bits in memory.

// 1.
let bytes = [82, 105, 111];
let bit: &BitStr = BitStr::from(&bytes);

// 2.
let bytes = b"Rust";
let bit: &BitStr = BitStr::from(bytes);

// 3.
let bit: &BitStr = BitStr::from(b"My sequence of bytes");
let op = bit.contains([82, 105, 111]); // false

// 4.
let bit: &BitStr = BitStr::from(b"Rio");
let op = bit.contains_u8(82); // true

TODO

  • encode_utf16
  • replace
  • starts_with, ends_with
  • get, get_mut
  • get_unchecked, get_unchecked_mut
  • slice_unchecked, slice_unchecked_mut