You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How about making this library able to use static buffers?
I am playing with them now on this branch. For now I've added b64_encode_static because it has different parameters set, but ideally would be to make one entry point with optional (nullable) parameter for output buffer, so b64_encode would look like this.
Another thing would be introduce some macro (eg B64_STATIC_BUFFERS_ONLY) which would exclude code for dynamic memory allocation. Have a look at nanopb library. Quite big, but in can run both with dynamic memory allocation and without (excluded at compilation time).
Motivation for this is performance improvement - I am currently making project which is translating some serial protocol into another (with human readable frames) so that calling malloc and free for every single incoming byte seems to be overhead for this task.
The text was updated successfully, but these errors were encountered:
How about making this library able to use static buffers?
I am playing with them now on this branch. For now I've added
b64_encode_static
because it has different parameters set, but ideally would be to make one entry point with optional (nullable) parameter for output buffer, sob64_encode
would look like this.Another thing would be introduce some macro (eg
B64_STATIC_BUFFERS_ONLY
) which would exclude code for dynamic memory allocation. Have a look at nanopb library. Quite big, but in can run both with dynamic memory allocation and without (excluded at compilation time).Motivation for this is performance improvement - I am currently making project which is translating some serial protocol into another (with human readable frames) so that calling malloc and free for every single incoming byte seems to be overhead for this task.
The text was updated successfully, but these errors were encountered: