7 #include "packager/media/base/bit_writer.h"
13 : storage_(storage), initial_storage_size_(storage_->size()) {}
16 DCHECK_NE(number_of_bits, 0u);
17 DCHECK_LE(number_of_bits, 32u);
18 DCHECK_LT(bits, 1ULL << number_of_bits);
20 num_bits_ += number_of_bits;
21 DCHECK_LE(num_bits_, 64);
22 bits_ |=
static_cast<uint64_t
>(bits) << (64 - num_bits_);
24 while (num_bits_ >= 8) {
25 storage_->push_back(bits_ >> 56);
32 while (num_bits_ > 0) {
33 storage_->push_back(bits_ >> 56);