#bitstream #reader #single #bit #reading #values #ordinary

bitstream-rs

Crate for reading and writing single bit values from ordinary Readers and Writers

3 unstable releases

Uses old Rust 2015

0.2.0 Jun 4, 2017
0.1.2 Jan 6, 2017
0.1.1 Jan 6, 2017

#19 in #bitstream

Download history 9/week @ 2024-07-22 28/week @ 2024-07-29 94/week @ 2024-08-05 37/week @ 2024-08-12 15/week @ 2024-08-19 10/week @ 2024-08-26 3/week @ 2024-09-09 30/week @ 2024-09-16 24/week @ 2024-09-23 32/week @ 2024-09-30 15/week @ 2024-10-07 26/week @ 2024-10-14 2/week @ 2024-10-21 2/week @ 2024-10-28 26/week @ 2024-11-04

59 downloads per month
Used in huffman-coding

MIT license

17KB
310 lines

bitstream-rs

Rust crate for reading and writing single bit values from ordinary Readers and Writers

Usage

Add this library to your dependencies in your Cargo.toml

[dependencies]
bitstream-rs = "0.2.0"

Then import it in your source code

extern crate bitstream;

You can now use the BitReader and BitWriter

let mut writer = BitWriter::new(outfile);
let mut reader = BitReader::new(infile);

For more information, take a look at the docs


lib.rs:

bitstream is a crate for dealing with single bit input and output

This crate provides a writer that can write single bits to an underlying Write implementation, and read them back using a reader implementation.

No runtime deps