Closed GoogleCodeExporter closed 9 years ago
It makes the internal logic simpler and the code smaller and faster. So it is a
tradeoff.
The case where the data is already in memory somewhere can be solved by using a
callback function without copying the data.
See for example
https://code.google.com/p/nanopb/source/browse/tests/callbacks/encode_callbacks.
c#9 the pb_encode_string() can also be used for bytes type.
Original comment by Petteri.Aimonen
on 22 Oct 2014 at 9:25
Reviewing the differences, I must admit that the savings from the change were
not very great in code size or efficiency. But on the other hand, there is not
sufficient reason to change it back again now.
Hopefully the callback method is not too cumbersome to use. Passing the size of
the memory can be somewhat annoying, though, and may require making a custom
structure for the purpose.
Original comment by Petteri.Aimonen
on 22 Dec 2014 at 6:58
Thank you for your reply.
I got it.
Happy new year! :)
Original comment by hellowoo...@gmail.com
on 4 Jan 2015 at 8:20
Original issue reported on code.google.com by
hellowoo...@gmail.com
on 22 Oct 2014 at 8:56