xapian-core
1.4.27
|
Read a stream created by BitWriter. More...
#include <bitstream.h>
Classes | |
struct | DIStack |
struct | DIState |
Public Member Functions | |
BitReader () | |
BitReader (const std::string &buf_) | |
BitReader (const std::string &buf_, size_t skip) | |
void | init (const std::string &buf_, size_t skip=0) |
Xapian::termpos | decode (Xapian::termpos outof, bool force=false) |
bool | check_all_gone () const |
void | decode_interpolative (int j, int k, Xapian::termpos pos_j, Xapian::termpos pos_k) |
Perform interpolative decoding between elements between j and k. More... | |
Xapian::termpos | decode_interpolative_next () |
Perform on-demand interpolative decoding. More... | |
Private Member Functions | |
Xapian::termpos | read_bits (int count) |
Private Attributes | |
std::string | buf |
size_t | idx |
int | n_bits |
Xapian::termpos | acc |
std::vector< DIStack > | di_stack |
DIState | di_current |
Read a stream created by BitWriter.
Definition at line 64 of file bitstream.h.
|
inline |
Definition at line 118 of file bitstream.h.
|
inlineexplicit |
Definition at line 121 of file bitstream.h.
|
inline |
Definition at line 125 of file bitstream.h.
|
inline |
Definition at line 145 of file bitstream.h.
Xapian::termpos Xapian::BitReader::decode | ( | Xapian::termpos | outof, |
bool | force = false |
||
) |
Definition at line 176 of file bitstream.cc.
References Assert, highest_order_bit(), and Xapian::safe_shl().
Referenced by check_chert_table(), check_glass_table(), ChertPositionListTable::positionlist_count(), and GlassPositionListTable::positionlist_count().
void Xapian::BitReader::decode_interpolative | ( | int | j, |
int | k, | ||
Xapian::termpos | pos_j, | ||
Xapian::termpos | pos_k | ||
) |
Perform interpolative decoding between elements between j and k.
Definition at line 224 of file bitstream.cc.
References Assert, and highest_order_bit().
Xapian::termpos Xapian::BitReader::decode_interpolative_next | ( | ) |
Perform on-demand interpolative decoding.
Definition at line 234 of file bitstream.cc.
|
inline |
Definition at line 129 of file bitstream.h.
References decode(), and Xapian::BitReader::DIState::uninit().
|
private |
Definition at line 197 of file bitstream.cc.
References Assert.
|
private |
Definition at line 68 of file bitstream.h.
|
private |
Definition at line 65 of file bitstream.h.
|
private |
Definition at line 114 of file bitstream.h.
|
private |
Definition at line 113 of file bitstream.h.
|
private |
Definition at line 66 of file bitstream.h.
|
private |
Definition at line 67 of file bitstream.h.