#endian #read #data #reader #urex #binary-readers #endianed

urex-binary-io

Implementation of endianed BinaryReaders for use in urex

3 releases

0.1.2 Mar 30, 2023
0.1.1 Mar 29, 2023
0.1.0 Mar 28, 2023

#59 in #endian

39 downloads per month

MIT license

36KB
700 lines

UREX - binary-io Build Status Latest Version

TODO


lib.rs:

A crate that implements endianed BinaryReaders for use in urex.

This crate provides the BinaryRead and BinaryWrite traits and three implementations of them each.

The BinaryRead and BinaryWrite traits aren't implemented for std::io::Read and std::io::Write respectively, because they are not endian aware. Instead, they are implemented for the three endian aware structs that either set the endianness or make it variable.

The implementations are namely:

The VE stands for variable endian, the LE stands for little-endian, and the BE stands for big-endian.

The BinaryReaderVE and BinaryWriterVE structs are flexible, allowing you to set and change the endianness at runtime. The endianness can be set by setting the endian field, which is of type Endian.
The BinaryReaderLE and BinaryWriterLE structs are restrictive, as they only allow you to read/write little-endian data.
The BinaryReaderBE and BinaryWriterBE structs are restrictive, as they only allow you to read/write big-endian data.

Dependencies

~375KB