Module: RubyTorrent::StringExpandBits
- Includes:
- StringMapBytes
- Defined in:
- lib/rubytorrent/message.rb
Instance Method Summary collapse
-
#expand_bits ⇒ Object
just for debugging purposes.
Methods included from StringMapBytes
Instance Method Details
#expand_bits ⇒ Object
just for debugging purposes
42 43 44 45 46 |
# File 'lib/rubytorrent/message.rb', line 42 def # just for debugging purposes self.map_bytes do |b| (0 .. 7).map { |i| ((b & (1 << (7 - i))) == 0 ? "0" : "1") } end.flatten.join end |