unpack from delimited data

def unpack(data):
    '''unpack from delimited data'''
    size, position = decoder._DecodeVarint(data, 0)
    envelope = wire.Envelope() 
    envelope.ParseFromString(data[position:position+size])
    return envelope