/*! This crate provides convenience methods for encoding and decoding numbers in either big-endian or little-endian order. The organization of the crate is pretty simple. A trait, `ByteOrder`, specifies byte conversion methods for each type of number in Rust (sans numbers that have a platform dependent size like `usize` and `isize`). Two types, `BigEndian` and `LittleEndian` implement these methods. Finally, `ReadBytesExt` and `WriteBytesExt` provide convenience methods available to all types that implement `Read` and `Write`. # Examples Read unsigned 16 bit big-endian integers from a `Read` type: ```rust use std::io::Cursor; use byteorder::{BigEndian, ReadBytesExt}; let mut rdr = Cursor::new(vec![2, 5, 3, 0]); // Note that we use type parameters to indicate which kind of byte order // we want! assert_eq!(517, rdr.read_u16::().unwrap()); assert_eq!(768, rdr.read_u16::().unwrap()); ``` Write unsigned 16 bit little-endian integers to a `Write` type: ```rust use byteorder::{LittleEndian, WriteBytesExt}; let mut wtr = vec![]; wtr.write_u16::(517).unwrap(); wtr.write_u16::(768).unwrap(); assert_eq!(wtr, vec![5, 2, 0, 3]); ``` */