I'm trying to encode protobuf to Vec without protobuf's encoding method to make more compression and to easy access the required part without deserializing everything.
Looks like my code is not performant as protobuf serialization.
My source code looks like this
Protobuf library using
something like this
My assumption with extend is that it's iterating the slice and copying one by one instead of copying it in one go.
Is there any idiomatic way to do?
I don't want to track the position and grow (lot of overhead)
is there anyway to make it simple and performant?