A monkey patch to force byte-aligned primitives to become bit-aligned. This allows them to be used at non byte based boundaries.
class BitString < BinData::String bit_aligned end class MyRecord < BinData::Record bit4 :preamble bit_string :str, :length => 2 end
# File lib/bindata/alignment.rb, line 62 def do_num_bytes super.to_f end
Generated with the Darkfish Rdoc Generator 2.