Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upOption to set the bytes used for encoding str? #226
Closed
Comments
|
Nope, not possible. If you are decoding a network protocol, I'd recommend taking a look at Nom. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey,
I thought it might interesting to use this library to decode a network protocol. The protocol Im working with uses one byte to determine the length of a string. Would be it be possible to have an option that sets the amount of bytes used when encoding or decoding?
Something I tried was this
This struct
would be encoded like this
[100,78,4,116,101,115,116]instead of
[100, 78, 4, 0, 0, 0, 0, 0, 0, 0, 116, 101, 115, 116]