Expand description
The io module implements composable bit- and byte-level I/O.
The following nomenclature is used to denote where the data being read is sourced from:
- A
Streamconsumes any source implementingReadBytesone byte at a time. - A
Readerconsumes a&[u8].
The sole exception to this rule is MediaSourceStream which consumes sources implementing
MediaSource (aka. std::io::Read).
All Readers and Streams operating on bytes of data at a time implement the ReadBytes
trait. Likewise, all Readers and Streams operating on bits of data at a time implement
either the ReadBitsLtr or ReadBitsRtl traits depending on the order in which they
consume bits.
Modules§
- vlc
- The
vlcmodule provides support for decoding variable-length codes (VLC).
Structs§
- BitReader
Ltr BitReaderLtrreads bits from most-significant to least-significant from any&[u8].- BitReader
Rtl BitReaderRtlreads bits from least-significant to most-significant from any&[u8].- BitStream
Ltr BitStreamLtrreads bits from most-significant to least-significant from any source that implementsReadBytes.- BitStream
Rtl BitStreamRtlreads bits from least-significant to most-significant from any source that implementsReadBytes.- BufReader
- A
BufReaderreads bytes from a byte buffer. - Media
Source Stream MediaSourceStreamis the main reader type for Symphonia.- Media
Source Stream Options MediaSourceStreamOptionsspecifies the buffering behaviour of aMediaSourceStream.- Monitor
Stream - A
MonitorStreamis a passive stream that observes all operations performed on the inner stream and forwards an immutable reference of the result to aMonitor. - Read
Only Source ReadOnlySourcewraps any source implementingstd::io::Readin an unseekableMediaSource.- Scoped
Stream - A
ScopedStreamrestricts the number of bytes that may be read to an upper limit.
Traits§
- Finite
BitStream - A
FiniteBitStreamis a bit stream that has a known length in bits. - Finite
Stream - A
FiniteStreamis a stream that has a known length in bytes. - Media
Source MediaSourceis a composite trait ofstd::io::Readandstd::io::Seek. A source must implement this trait to be used byMediaSourceStream.- Monitor
- A
Monitorprovides a common interface to examine the operations observed be aMonitorStream. - Read
Bits Ltr ReadBitsLtrreads bits from most-significant to least-significant.- Read
Bits Rtl ReadBitsRtlreads bits from least-significant to most-significant.- Read
Bytes ReadBytesprovides methods to read bytes and interpret them as little- or big-endian unsigned integers or floating-point values of standard widths.- Seek
Buffered SeekBufferedprovides methods to seek within the buffered portion of a stream.