Python raw packet serializer/deserializer