-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for fragment encoding #244
Comments
The problem is that the encoder doesn't know the byte count until the end of the string. We could consider adding new APIs to used when the byte count is known beforehand. Thanks for the suggestion, will look into this in the future. |
I think this request is almost the same as one of my needs, that in other libraries is called streaming array. See as an example libcbor. (With a different CBOR library) I implemented this feature by myself (simplified version), but I'm not satisfied about the API I created. |
@escherstair Have you looked into |
I have to investigate and understand how it works |
Such a feature might be an interesting addition. I had to implement generating the CBOR part (serializing CBOR header, then appending opaque on the fly) myself, in order to send a big opaque LwM2M resource block-wise in SenML-CBOR.
|
As for decoder with the zcbor_bstr_start_decode_fragment function to only read the CBOR header in case of block-wise (COAP) transfer, it could be interesting to create the same capability in encoder to only encode partial data into several fragments and set the header only once.
The text was updated successfully, but these errors were encountered: