16#ifndef CXXUTILS_BITUNPACKER_H
17#define CXXUTILS_BITUNPACKER_H
37template <
class STREAM>
83template <
class STREAM>
130template <
class STREAM>
BitUnpacker16(uint8_t nbits, STREAM &stream)
Constructor.
uint8_t m_nbuf
Number of valid words currently buffered.
uint32_t unpack()
Unpack one value from the stream.
BitUnpacker16(STREAM &stream)
Constructor.
STREAM & m_stream
The input stream.
uint32_t m_buf
Buffer for the current word being unpacked.
BitUnpacker8(STREAM &stream)
Constructor.
uint32_t unpack()
Unpack one value from the stream.
BitUnpacker8(uint8_t nbits, STREAM &stream)
Constructor.
uint32_t m_buf
Buffer for the current word being unpacked.
STREAM & m_stream
The input stream.
uint8_t m_nbuf
Number of valid bytes currently buffered.
uint8_t m_nbits
Number of bits to use for each item.
uint32_t m_buf
Buffer for the current word being unpacked.
uint32_t m_mask
Mask with the low m_nbits bits set.
uint32_t unpack()
Unpack one value from the stream.
BitUnpacker(uint8_t nbits, STREAM &stream)
Constructor.
STREAM & m_stream
The input stream.
uint8_t m_nbuf
Number of valid bits currently buffered.