Furrent
|
Namespaces | |
fur | |
Common types used in all the project. | |
fur::download | |
fur::download::bitfield | |
Functions | |
int64_t | byte_index (int64_t bit_index) |
What byte contains the bit at bit_index ? More... | |
int64_t | byte_offset (int64_t bit_index) |
void | assert_within_bounds (int64_t len, int64_t index) |
Throws an exception if index is not within the bounds of the bitfield. More... | |
std::ostream & | fur::download::bitfield::operator<< (std::ostream &os, const Bitfield &bf) |
Variables | |
const uint8_t | INDEX_ZERO = 0 | (1 << 7) |
void assert_within_bounds | ( | int64_t | len, |
int64_t | index | ||
) |
Throws an exception if index
is not within the bounds of the bitfield.
int64_t byte_index | ( | int64_t | bit_index | ) |
What byte contains the bit at bit_index
?
int64_t byte_offset | ( | int64_t | bit_index | ) |
How many bits from the beginning of the correct byte does the bit at bit_index
live?
const uint8_t INDEX_ZERO = 0 | (1 << 7) |