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
When take_from_bytes_cobs fails to deserialize a value or is called on an incomplete COBS frame, it doesn't return the the remainder of the buffer.
In the first case, the buffer now contains a sequence of bytes already decoded with COBS, a zero and a sequence of bytes not yet decoded with COBS. It would be helpful if the method returned the unencoded portion of the buffer back, so that it could be easily handled further.
In the second case when the buffer doesn't contain a whole COBS frame, it'll leave the buffer further unprocessable.
As a workaround for my project, I implemented a thin wrapper around from_bytes_cobs that always returns the remainder of the buffer.
I can create a PR, if this is the right way to do this.
When
take_from_bytes_cobs
fails to deserialize a value or is called on an incomplete COBS frame, it doesn't return the the remainder of the buffer.In the first case, the buffer now contains a sequence of bytes already decoded with COBS, a zero and a sequence of bytes not yet decoded with COBS. It would be helpful if the method returned the unencoded portion of the buffer back, so that it could be easily handled further.
In the second case when the buffer doesn't contain a whole COBS frame, it'll leave the buffer further unprocessable.
As a workaround for my project, I implemented a thin wrapper around
from_bytes_cobs
that always returns the remainder of the buffer.I can create a PR, if this is the right way to do this.
This is remotely related to: #71 .
The text was updated successfully, but these errors were encountered: