The binary-layout library allows type-safe, inplace, zero-copy access to structured binary data. You define a custom data layout and give it a slice of binary data, and it will allow you to read and write the fields defined in the layout from the binary data without having to copy any of the data. It's similar to transmuting to/from a #[repr(packed)] struct, but much safer.
Apache License 2.0
66
stars
9
forks
source link
WIP: Added support for i128/u128, but currently failing tests. #3
I realized that I made a mistake in how I wrote the tests. The offsets weren't large enough, so values were overlapping in the byte arrays. Now fixed in the other PR I'm about to make.
This PR contains updates to support
*128
, but there is a test failure:Looks like -1 in the last byte, not sure why though.