mirror of https://github.com/SeanOMik/libki.git
util: Forgot to push header file for previous commit
This commit is contained in:
parent
b9455e243f
commit
25d371b49f
|
@ -21,6 +21,7 @@ namespace ki
|
||||||
explicit stream_pos(intmax_t byte = 0, int bit = 0);
|
explicit stream_pos(intmax_t byte = 0, int bit = 0);
|
||||||
stream_pos(const stream_pos &cp);
|
stream_pos(const stream_pos &cp);
|
||||||
|
|
||||||
|
intmax_t as_bits() const;
|
||||||
intmax_t get_byte() const;
|
intmax_t get_byte() const;
|
||||||
uint8_t get_bit() const;
|
uint8_t get_bit() const;
|
||||||
|
|
||||||
|
@ -148,6 +149,20 @@ namespace ki
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy memory from an external buffer into the bitstream's buffer from the current position.
|
||||||
|
* @param src The buffer to copy data from.
|
||||||
|
* @param bitsize The number of bits to copy from the src buffer.
|
||||||
|
*/
|
||||||
|
void write_copy(uint8_t *src, std::size_t bitsize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy memory from the bitstream's buffer into an external buffer.
|
||||||
|
* @param dst The destination buffer to copy data to.
|
||||||
|
* @param bitsize The number of bits to copy into the dst buffer.
|
||||||
|
*/
|
||||||
|
void read_copy(uint8_t *dst, std::size_t bitsize);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t *m_buffer;
|
uint8_t *m_buffer;
|
||||||
std::size_t m_buffer_size;
|
std::size_t m_buffer_size;
|
||||||
|
|
Loading…
Reference in New Issue