add byte serialize function to Serializer