/// Bitstream reading modes.
-#[derive(Debug)]
+#[derive(Debug,Clone,Copy)]
pub enum BitReaderMode {
/// The stream is big endian MSB first.
BE,
}
/// A list specifying general bitstream reading errors.
-#[derive(Debug)]
+#[derive(Debug,Clone,Copy)]
pub enum BitReaderError {
/// The reader is at the end of bitstream.
BitstreamEnd,
pub type BitReaderResult<T> = Result<T, BitReaderError>;
/// Bitstream reader.
-#[derive(Debug)]
+#[derive(Debug,Clone)]
pub struct BitReader<'a> {
cache: u64,
bits: u8,