def decode_table(encoded, offset):
 result = {}
 tablesize = struct.unpack_from('>I', encoded, offset)[0]
 offset += 4
 limit = (offset + tablesize)
 while (offset < limit):
  (key, offset) = decode_short_string(encoded, offset)
  (value, offset) = decode_value(encoded, offset)
  result[key] = value
 return (result, offset)

def decode_table ( encoded , offset ) : result = { } tablesize = struct . unpack_from ( '>I' , encoded , offset ) [ 0 ] offset += 4 limit = ( offset + tablesize ) while ( offset < limit ) : ( key , offset ) = decode_short_string ( encoded , offset ) ( value , offset ) = decode_value ( encoded , offset ) result [ key ] = value return ( result , offset )
decode the amqp table passed in from the encoded value returning the decoded result and the number of bytes read plus the offset .