lib/eth/rlp/decoder.rb
def perform(rlp)
        rlp = Util.hex_to_bin rlp if Util.is_hex? rlp
        rlp = Util.str_to_bytes rlp
        begin
          item, next_start = consume_item rlp, 0
        rescue Exception => e
          raise DecodingError, "Cannot decode rlp string: #{e}"
        end
        raise DecodingError, "RLP string ends with #{rlp.size - next_start} superfluous bytes" if next_start != rlp.size
        return item
      end
# Decodes an RLP-encoded object.
#
# @param rlp [String] an RLP-encoded object.
# @return [Object] the decoded and maybe deserialized object.
# @raise [Eth::Rlp::DecodingError] if the input string does not end after
#     the root item.
Decodes an RLP-encoded object.
Decodes an RLP - encoded object .
def perform(rlp)
        rlp = Util.hex_to_bin rlp if Util.is_hex? rlp
        rlp = Util.str_to_bytes rlp
        begin
          item, next_start = consume_item rlp, 0
        rescue Exception => e
          raise DecodingError, "Cannot decode rlp string: #{e}"
        end
        raise DecodingError, "RLP string ends with #{rlp.size - next_start} superfluous bytes" if next_start != rlp.size
        return item
      end
def perform ( rlp ) rlp = Util . hex_to_bin rlp if Util . is_hex? rlp rlp = Util . str_to_bytes rlp begin item , next_start = consume_item rlp , 0 rescue Exception => e raise DecodingError , "Cannot decode rlp string: #{e}" end raise DecodingError , "RLP string ends with #{rlp.size - next_start} superfluous bytes" if next_start != rlp . size return item end
Decodes an RLP-encoded object.
Decodes an RLP - encoded object .
the decoded and maybe deserialized object.
the decoded and maybe deserialized object .
Object
[Eth::Rlp::DecodingError] if the input string does not end after the root item.
[ Eth :: Rlp :: DecodingError ] if the input string does not end after the root item .
rlp
an RLP-encoded object.
an RLP - encoded object .