Read a byte-aligned, forward, least-significant-bit-first bitstream. More...
#include <zstandard.hpp>
Public Member Functions | |
| forward_bit_reader (std::span< std::byte const > input) noexcept | |
| Constructs a reader over a non-owning byte span. | |
| std::uint32_t | peek_bits (std::uint8_t count) const |
| Returns the next bits without consuming them. | |
| std::uint32_t | read_bits (std::uint8_t count) |
| Consumes and returns the next bits. | |
| std::size_t | consumed_bytes () const noexcept |
| Returns the whole number of bytes occupied by consumed bits. | |
Read a byte-aligned, forward, least-significant-bit-first bitstream.
Definition at line 137 of file zstandard.hpp.
|
inlineexplicitnoexcept |
Constructs a reader over a non-owning byte span.
| input | Complete forward bitstream retained for this object's lifetime. |
Definition at line 144 of file zstandard.hpp.
|
inlinenodiscardnoexcept |
Returns the whole number of bytes occupied by consumed bits.
Definition at line 185 of file zstandard.hpp.
Referenced by rpnx::compression::zstandard_codec::parse_normalized_probabilities().
|
inlinenodiscard |
Returns the next bits without consuming them.
| count | Number of bits, at most 32. |
Definition at line 153 of file zstandard.hpp.
References rpnx::compression::invalid_data, and rpnx::compression::zstandard.
Referenced by rpnx::compression::zstandard_codec::parse_normalized_probabilities(), and read_bits().
|
inlinenodiscard |
Consumes and returns the next bits.
| count | Number of bits, at most 32. |
Definition at line 174 of file zstandard.hpp.
References peek_bits().
Referenced by rpnx::compression::zstandard_codec::parse_normalized_probabilities().