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 current interface with paired functions like QCBOREncode_OpenArray() and QCBOREncode_CloseArray() use a late insertion of the array head during close when the size of the array is known by the encoder. This requires the use of memory insertion and memmove() though.
In cases where the size of an definite-length array or map is known by the application before opening it, could there be a public function to write the size immediately at open?
This wouldn't be a change in capability of the encoder, just one of efficiency if the length is known at time of opening. The existing bookkeeping of number of items actually encoded could still be checked against this definite length so that an error occurs at CloseArray if the actual differed from the open length. Because it's not a difference of capability this is just a wishlist request.
The text was updated successfully, but these errors were encountered:
The current interface with paired functions like
QCBOREncode_OpenArray()
andQCBOREncode_CloseArray()
use a late insertion of the array head during close when the size of the array is known by the encoder. This requires the use of memory insertion andmemmove()
though.In cases where the size of an definite-length array or map is known by the application before opening it, could there be a public function to write the size immediately at open?
Something like
This wouldn't be a change in capability of the encoder, just one of efficiency if the length is known at time of opening. The existing bookkeeping of number of items actually encoded could still be checked against this definite length so that an error occurs at CloseArray if the actual differed from the open length. Because it's not a difference of capability this is just a wishlist request.
The text was updated successfully, but these errors were encountered: