pub struct BigEndian;
Expand description

Selector type for big-endian streams.

Trait Implementations§

source§

impl<E: Error + Send + Sync + 'static, WR: WordRead<Error = E, Word = u64> + WordSeek<Error = E>, RP: ReadParams> BitRead<BigEndian> for BitReader<BE, WR, RP>

§

type Error = <WR as WordRead>::Error

§

type PeekWord = u32

The type we can read from the stream without advancing.
source§

fn skip_bits(&mut self, n_bits: usize) -> Result<(), Self::Error>

Skip n bits from the stream. Read more
source§

fn read_bits(&mut self, n_bits: usize) -> Result<u64, Self::Error>

Read n bits and return them in the lowest bits. Read more
source§

fn peek_bits(&mut self, n_bits: usize) -> Result<u32, Self::Error>

Peeks at n bits without advancing the stream position. n must be nonzero, and at most PeekWord::BITS.
source§

fn read_unary(&mut self) -> Result<u64, Self::Error>

Read a unary code.
source§

fn copy_to<F: Endianness, W: BitWrite<F>>( &mut self, bit_write: &mut W, n: u64 ) -> Result<(), CopyError<Self::Error, W::Error>>

source§

impl<WR: WordRead, RP: ReadParams> BitRead<BigEndian> for BufBitReader<BE, WR, RP>

§

type Error = <WR as WordRead>::Error

§

type PeekWord = <<WR as WordRead>::Word as DoubleType>::DoubleType

The type we can read from the stream without advancing.
source§

fn peek_bits(&mut self, n_bits: usize) -> Result<Self::PeekWord, Self::Error>

Peeks at n bits without advancing the stream position. n must be nonzero, and at most PeekWord::BITS.
source§

fn read_bits(&mut self, n_bits: usize) -> Result<u64, Self::Error>

Read n bits and return them in the lowest bits. Read more
source§

fn read_unary(&mut self) -> Result<u64, Self::Error>

Read a unary code.
source§

fn skip_bits(&mut self, n_bits: usize) -> Result<(), Self::Error>

Skip n bits from the stream. Read more
source§

fn copy_to<F: Endianness, W: BitWrite<F>>( &mut self, bit_write: &mut W, n: u64 ) -> Result<(), CopyError<Self::Error, W::Error>>

source§

impl<WW: WordWrite, WP: WriteParams> BitWrite<BigEndian> for BufBitWriter<BE, WW, WP>
where u64: CastableInto<WW::Word>,

§

type Error = <WW as WordWrite>::Error

source§

fn flush(&mut self) -> Result<usize, Self::Error>

Flush the buffer, consuming the bit stream. Read more
source§

fn write_bits( &mut self, value: u64, n_bits: usize ) -> Result<usize, Self::Error>

Write the lowest n bits of value to the stream and return the number of bits written, that is, n. Read more
source§

fn write_unary(&mut self, value: u64) -> Result<usize, Self::Error>

Write value as a unary code to the stream and return the number of bits written, that is, value plus one.
source§

fn copy_from<F: Endianness, R: BitRead<F>>( &mut self, bit_read: &mut R, n: u64 ) -> Result<(), CopyError<R::Error, Self::Error>>

source§

impl Clone for BigEndian

source§

fn clone(&self) -> BigEndian

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BigEndian

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<E: Error + Send + Sync + 'static, WR: WordRead<Error = E, Word = u64> + WordSeek<Error = E>> DeltaRead<BigEndian> for BitReader<BigEndian, WR, DefaultReadParams>

source§

fn read_delta(&mut self) -> Result<u64, Self::Error>

source§

impl<WR: WordRead> DeltaRead<BigEndian> for BufBitReader<BigEndian, WR, DefaultReadParams>

source§

fn read_delta(&mut self) -> Result<u64, Self::Error>

source§

impl<WR: WordWrite, DC: WriteParams> DeltaWrite<BigEndian> for BufBitWriter<BigEndian, WR, DC>
where u64: CastableInto<WR::Word>,

source§

fn write_delta(&mut self, value: u64) -> Result<usize, Self::Error>

source§

impl<E: Error + Send + Sync + 'static, WR: WordRead<Error = E, Word = u64> + WordSeek<Error = E>> GammaRead<BigEndian> for BitReader<BigEndian, WR, DefaultReadParams>

source§

fn read_gamma(&mut self) -> Result<u64, Self::Error>

source§

impl<WR: WordRead> GammaRead<BigEndian> for BufBitReader<BigEndian, WR, DefaultReadParams>

source§

fn read_gamma(&mut self) -> Result<u64, Self::Error>

source§

impl<WR: WordWrite> GammaWrite<BigEndian> for BufBitWriter<BigEndian, WR, DefaultWriteParams>
where u64: CastableInto<WR::Word>,

source§

fn write_gamma(&mut self, value: u64) -> Result<usize, Self::Error>

source§

impl PartialEq for BigEndian

source§

fn eq(&self, other: &BigEndian) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<E: Error + Send + Sync + 'static, WR: WordRead<Error = E, Word = u64> + WordSeek<Error = E>> ZetaRead<BigEndian> for BitReader<BigEndian, WR, DefaultReadParams>

source§

fn read_zeta(&mut self, k: u64) -> Result<u64, Self::Error>

source§

fn read_zeta3(&mut self) -> Result<u64, Self::Error>

source§

impl<WR: WordRead> ZetaRead<BigEndian> for BufBitReader<BigEndian, WR, DefaultReadParams>

source§

fn read_zeta(&mut self, k: u64) -> Result<u64, Self::Error>

source§

fn read_zeta3(&mut self) -> Result<u64, Self::Error>

source§

impl<WR: WordWrite, DC: WriteParams> ZetaWrite<BigEndian> for BufBitWriter<BigEndian, WR, DC>
where u64: CastableInto<WR::Word>,

source§

fn write_zeta(&mut self, value: u64, k: u64) -> Result<usize, Self::Error>

source§

fn write_zeta3(&mut self, value: u64) -> Result<usize, Self::Error>

source§

impl Eq for BigEndian

source§

impl StructuralPartialEq for BigEndian

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CastableFrom<T> for T

source§

fn cast_from(value: T) -> T

Call Self as W
source§

impl<T, U> CastableInto<U> for T
where U: CastableFrom<T>,

source§

fn cast(self) -> U

Call W::cast_from(self)
source§

impl<B> DeltaReadParam<BigEndian> for B

source§

fn read_delta_param<const USE_DELTA_TABLE: bool, const USE_GAMMA_TABLE: bool>( &mut self ) -> Result<u64, <B as BitRead<BigEndian>>::Error>

source§

impl<B> DeltaWriteParam<BigEndian> for B

source§

fn write_delta_param<const USE_DELTA_TABLE: bool, const USE_GAMMA_TABLE: bool>( &mut self, n: u64 ) -> Result<usize, <B as BitWrite<BigEndian>>::Error>

source§

impl<T> DowncastableFrom<T> for T

source§

fn downcast_from(value: T) -> T

Truncate the current UnsignedInt to a possibly smaller size
source§

impl<T, U> DowncastableInto<U> for T
where U: DowncastableFrom<T>,

source§

fn downcast(self) -> U

Call W::downcast_from(self)
source§

impl<T> Endianness for T
where T: Endianness,

source§

const NAME: &'static str = const NAME: &'static str = T::_NAME;

The name of the endianness.
source§

const IS_LITTLE: bool = const IS_LITTLE: bool = T::_IS_LITTLE;

Whether the endianness is little-endian.
source§

const IS_BIG: bool = const IS_BIG: bool = T::_IS_BIG;

Whether the endianness is big-endian.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<B> GammaReadParam<BigEndian> for B
where B: BitRead<BigEndian>,

source§

fn read_gamma_param<const USE_TABLE: bool>( &mut self ) -> Result<u64, <B as BitRead<BigEndian>>::Error>

source§

impl<B> GammaWriteParam<BigEndian> for B
where B: BitWrite<BigEndian>,

source§

fn write_gamma_param<const USE_TABLE: bool>( &mut self, n: u64 ) -> Result<usize, <B as BitWrite<BigEndian>>::Error>

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Splat<T> for T

source§

fn splat(value: T) -> T

source§

impl<T> To<T> for T

source§

fn to(self) -> T

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> UpcastableFrom<T> for T

source§

fn upcast_from(value: T) -> T

Extend the current UnsignedInt to a possibly bigger size.
source§

impl<T, U> UpcastableInto<U> for T
where U: UpcastableFrom<T>,

source§

fn upcast(self) -> U

Call W::upcast_from(self)
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<B> ZetaReadParam<BigEndian> for B
where B: BitRead<BigEndian>,

source§

fn read_zeta_param( &mut self, k: u64 ) -> Result<u64, <B as BitRead<BigEndian>>::Error>

source§

fn read_zeta3_param<const USE_TABLE: bool>( &mut self ) -> Result<u64, <B as BitRead<BigEndian>>::Error>

source§

impl<B> ZetaWriteParam<BigEndian> for B
where B: BitWrite<BigEndian>,

source§

fn write_zeta_param<const USE_TABLE: bool>( &mut self, n: u64, k: u64 ) -> Result<usize, <B as BitWrite<BigEndian>>::Error>

source§

fn write_zeta3_param<const USE_TABLE: bool>( &mut self, n: u64 ) -> Result<usize, <B as BitWrite<BigEndian>>::Error>