#codec #encoding #decoding #endianness #endian

endicon

Implementations of codicon traits for endianness encodings

5 stable releases

3.0.0 Sep 7, 2020
2.0.0 Feb 28, 2019
1.2.0 Feb 14, 2019
1.1.0 Jan 1, 2019
1.0.0 Oct 10, 2018

#507 in Algorithms

Apache-2.0

8KB
137 lines

Workflow Status Average time to resolve an issue Percentage of issues still open Maintenance

endicon

Implements endianness encodings using the codicon traits.

See the codicon crate for details.

Examples

use endicon::Endianness;
use codicon::Encoder;

let mut bytes = [0u8; 2];
let little = [1u8, 0u8];
let big = [0u8, 1u8];

1u16.encode(&mut bytes.as_mut(), Endianness::Little).unwrap();
assert_eq!(bytes, little);

1u16.encode(&mut bytes.as_mut(), Endianness::Big).unwrap();
assert_eq!(bytes, big);

License: Apache-2.0

Dependencies

~7KB