Grok
9.7.5
|
#include <BitIO.h>
Public Member Functions | |
BitIO (uint8_t *bp, uint64_t len, bool isCompressor) | |
BitIO (IBufferedStream *stream, bool isCompressor) | |
size_t | numBytes () |
Number of bytes written. More... | |
bool | write (uint32_t v, uint32_t n) |
Write bits. More... | |
void | read (uint32_t *bits, uint32_t n) |
Read bits. More... | |
bool | flush () |
Flush bits. More... | |
void | inalign () |
Passes the ending bits (coming from flushing) More... | |
bool | putcommacode (uint8_t n) |
void | getcommacode (uint8_t *n) |
bool | putnumpasses (uint32_t n) |
void | getnumpasses (uint32_t *numpasses) |
![]() | |
virtual | ~IBitIO () |
Private Member Functions | |
bool | putbit (uint8_t b) |
void | getbit (uint32_t *bits, uint8_t pos) |
bool | writeByte () |
void | bytein () |
Private Attributes | |
uint8_t * | start |
size_t | offset |
size_t | buf_len |
uint8_t | buf |
uint8_t | ct |
IBufferedStream * | stream |
bool | read0xFF |
grk::BitIO::BitIO | ( | uint8_t * | bp, |
uint64_t | len, | ||
bool | isCompressor | ||
) |
grk::BitIO::BitIO | ( | IBufferedStream * | stream, |
bool | isCompressor | ||
) |
|
private |
References buf, buf_len, ct, grk::GRK_ERROR(), J2K_MS_EPH, J2K_MS_SOP, offset, read0xFF, and start.
|
virtual |
Flush bits.
Implements grk::IBitIO.
References ct, and writeByte().
Referenced by grk::T2Compress::compressHeader().
|
private |
void grk::BitIO::getcommacode | ( | uint8_t * | n | ) |
References read().
void grk::BitIO::getnumpasses | ( | uint32_t * | numpasses | ) |
References read().
|
virtual |
Passes the ending bits (coming from flushing)
Implements grk::IBitIO.
|
virtual |
Number of bytes written.
Implements grk::IBitIO.
References offset.
|
private |
References buf, ct, and writeByte().
Referenced by write().
bool grk::BitIO::putcommacode | ( | uint8_t | n | ) |
References write().
Referenced by grk::T2Compress::compressHeader().
bool grk::BitIO::putnumpasses | ( | uint32_t | n | ) |
References write().
Referenced by grk::T2Compress::compressHeader().
|
virtual |
Read bits.
bits | pointer to bits buffer |
n | Number of bits to read |
Implements grk::IBitIO.
References getbit().
Referenced by grk::TagTree< T >::decodeValue(), getcommacode(), and getnumpasses().
|
virtual |
Write bits.
v | Value of bits |
n | Number of bits to write |
Implements grk::IBitIO.
References putbit(), and hwy::HWY_NAMESPACE::v.
Referenced by grk::TagTree< T >::compress(), grk::T2Compress::compressHeader(), putcommacode(), and putnumpasses().
|
private |
|
private |
Referenced by bytein(), getbit(), inalign(), putbit(), and writeByte().
|
private |
Referenced by bytein(), and writeByte().
|
private |
|
private |
Referenced by bytein(), numBytes(), and writeByte().
|
private |
Referenced by bytein().
|
private |
Referenced by bytein().
|
private |
Referenced by writeByte().