7 #ifndef PACKAGER_MEDIA_BASE_BIT_WRITER_H_
8 #define PACKAGER_MEDIA_BASE_BIT_WRITER_H_
14 #include "packager/base/logging.h"
24 explicit BitWriter(std::vector<uint8_t>* storage);
33 void WriteBits(uint32_t bits,
size_t number_of_bits);
42 size_t BytePos()
const {
return storage_->size() - initial_storage_size_; }
53 std::vector<uint8_t>*
const storage_ =
nullptr;
54 const size_t initial_storage_size_ = 0;
60 #endif // PACKAGER_MEDIA_BASE_BIT_WRITER_H_