-
Notifications
You must be signed in to change notification settings - Fork 6
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
branca decode does not handle binary data #10
Comments
This seems to be due to the expectation that the encoded data is valid UTF-8: Line 448 in 34758ab
This is compatible with this implementation's
In terms of spec-compliance, then
|
@brycx Suggest use pub fn encode<T: AsRef<[u8]>>(data: T, key: &[u8], timestamp: u32) -> Result<String, BrancaError> |
@J-F-Liu Thank you for the suggestion. I think your proposal could be a good idea. However, @return currently is very busy and has given me permission to merge and update the crate with the purpose of fixing current bugs. As there were no generic parameters used in function signatures before, I will not add these now. This is simply to change as little as possible in order to fix the issue and stick to the current API as much as possible. I will open an issue for generic parameters, which @return can then decide upon once they have time again. |
ct
do decode in this implementation-> it will return b'\xef\xbf\xbd'
The spec allows binary data:
..... serialized by MessagePack or Protocol Buffers.
from branca.ioThe text was updated successfully, but these errors were encountered: