Method: ErlangBitstream#add_bits
- Defined in:
- lib/utils/erlang_parser.rb
#add_bits(s) ⇒ Object
138 139 140 141 142 |
# File 'lib/utils/erlang_parser.rb', line 138 def add_bits(s) b = (@cur_bits + s).scan(/.{1,8}/) @data += b[0..-2].map { |x| x.to_i(2) } @cur_bits = b.last end |