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
The implementation always produces base64 strings aligned to four bytes plus one zero terminating character, but number of bytes allocated is higher - see attached encoded_lengths.csv.
It is possible of course, that no memory is saved due to alignment to several bytes blocks for CPU optimization - for alignment to 8 bytes blocks is current implementation correct, but as it is platform dependent, this could not be true in every cases.
Proposed solution:
Replace expression insize * 4 / 3 + 4 with (insize + 2) / 3 * 4 + 1 at line referenced above.
The text was updated successfully, but these errors were encountered:
There is allocated more memory than used for encoding strings in base64.
The implementation always produces base64 strings aligned to four bytes plus one zero terminating character, but number of bytes allocated is higher - see attached encoded_lengths.csv.
It is possible of course, that no memory is saved due to alignment to several bytes blocks for CPU optimization - for alignment to 8 bytes blocks is current implementation correct, but as it is platform dependent, this could not be true in every cases.
Proposed solution:
Replace expression
insize * 4 / 3 + 4
with(insize + 2) / 3 * 4 + 1
at line referenced above.The text was updated successfully, but these errors were encountered: