| 38 | } |
| 39 | |
| 40 | bool DecoderBuffer::StartBitDecoding(bool decode_size, uint64_t *out_size) { |
| 41 | if (decode_size) { |
| 42 | #ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED |
| 43 | if (bitstream_version_ < DRACO_BITSTREAM_VERSION(2, 2)) { |
| 44 | if (!Decode(out_size)) { |
| 45 | return false; |
| 46 | } |
| 47 | } else |
| 48 | #endif |
| 49 | { |
| 50 | if (!DecodeVarint(out_size, this)) { |
| 51 | return false; |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | bit_mode_ = true; |
| 56 | bit_decoder_.reset(data_head(), remaining_size()); |
| 57 | return true; |
| 58 | } |
| 59 | |
| 60 | void DecoderBuffer::EndBitDecoding() { |
| 61 | bit_mode_ = false; |
no test coverage detected