An IO implementation that supports bit level reading.
Add this to your application's shard.yml
:
dependencies:
io-binary:
github: taylorfinnell/io-binary
require "io-binary"
io = IO::Binary.new(Bytes.new(1, 3.to_u8)) # single byte of value 3
io.read_bit # => 1
io.read_bit # => 1
io.read_bit # => 0
Does not implement IO#write
.