# File lib/rubytorrent/bencoding.rb, line 157
  def self.parse_bencoding(c, s)
    ret = {}
    key = nil
    RubyTorrent::BStream.new(s).each do |x|
      if key == nil
        key = x
      else
        ret[key] = x
        key = nil
      end
    end

    raise RubyTorrent::BEncodingError, "no dictionary terminator" unless s.getc == ?e
    ret
  end