def _StructPackDecoder(wire_type, format):
 value_size = struct.calcsize(format)
 local_unpack = struct.unpack
 def InnerDecode(buffer, pos):
  new_pos = (pos + value_size)
  result = local_unpack(format, buffer[pos:new_pos])[0]
  return (result, new_pos)
 return _SimpleDecoder(wire_type, InnerDecode)

def _StructPackDecoder ( wire_type , format ) : value_size = struct . calcsize ( format ) local_unpack = struct . unpack def InnerDecode ( buffer , pos ) : new_pos = ( pos + value_size ) result = local_unpack ( format , buffer [ pos : new_pos ] ) [ 0 ] return ( result , new_pos ) return _SimpleDecoder ( wire_type , InnerDecode )
return a constructor for a decoder for a fixed-width field .