Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add Little Endian variants for Read/WriteExt #1915
There are functions to read in big endian format but not little endian, as mentioned on reddit.
Add read/write methods to
Looks like these methods are all generated with macros, I'll add
Tests are now fixed and everything appears to work correctly. I kept the test input the same between le and be variants.
Could this be parametrized with a type argument, same as in https://docs.rs/byteorder/1.1.0/byteorder/trait.ReadBytesExt.html?
The underlying crate tokio uses is the bytes crate, from which I copied the naming convention https://docs.rs/bytes/0.5.2/bytes/buf/trait.Buf.html#method.get_u16_le
This is the same naming that is used in std as well with methods like from_le
If you decide to move in a different direction, I can change this PR, but I think following the familiar naming convention is probably a good idea.