7 #ifndef PACKAGER_MEDIA_BASE_BIT_WRITER_H_
8 #define PACKAGER_MEDIA_BASE_BIT_WRITER_H_
13 #include <absl/log/log.h>
23 explicit BitWriter(std::vector<uint8_t>* storage);
32 void WriteBits(uint32_t bits,
size_t number_of_bits);
41 size_t BytePos()
const {
return storage_->size() - initial_storage_size_; }
52 std::vector<uint8_t>*
const storage_ =
nullptr;
53 const size_t initial_storage_size_ = 0;
All the methods that are virtual are virtual for mocking.