Closed laurencelundblade closed 1 month ago
This doesn't fully address #248. For the decoder there could be a public API similar to QCBORDecode_RetrieveInputStorage()
to access the input UsefulBufC
.
This doesn't fully address #248. For the encoder there could be a public API similar to
QCBORDecode_RetrieveInputStorage()
to access the inputUsefulBufC
.
You want the thus-far-encoded CBOR, right? You can get that by passing 0 as the start to SubString(). Finish() can also be called multiple times, but it errors if there are open arrays or maps, where SubString doesn't. (If you look inside the implementation of Finish and SubString are almost the same too)
Thanks for your feedback.
This doesn't fully address #248. For the encoder there could be a public API similar to
QCBORDecode_RetrieveInputStorage()
to access the inputUsefulBufC
.You want the thus-far-encoded CBOR, right? You can get that by passing 0 as the start to SubString(). Finish() can also be called multiple times, but it errors if there are open arrays or maps, where SubString doesn't. (If you look inside the implementation of Finish and SubString are almost the same too)
Thanks for your feedback.
Ahh, but you are talking about QCBORDecode() aren't you. That's fine. Got too focused on encode.
Ahh, but you are talking about QCBORDecode() aren't you. That's fine. Got too focused on encode.
Yes it didn't help that I had a typo in my comment. This is about a similar interface for the decoder.
Address #247 and #248
(initial PR; testing still needed)