| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_RTC_BASE_BITBUFFER_H_ | 11 #ifndef WEBRTC_RTC_BASE_BITBUFFER_H_ |
| 12 #define WEBRTC_RTC_BASE_BITBUFFER_H_ | 12 #define WEBRTC_RTC_BASE_BITBUFFER_H_ |
| 13 | 13 |
| 14 #include <stdint.h> // For integer types. | 14 #include <stdint.h> // For integer types. |
| 15 #include <stddef.h> // For size_t. | 15 #include <stddef.h> // For size_t. |
| 16 | 16 |
| 17 #include "webrtc/base/constructormagic.h" | 17 #include "webrtc/rtc_base/constructormagic.h" |
| 18 | 18 |
| 19 namespace rtc { | 19 namespace rtc { |
| 20 | 20 |
| 21 // A class, similar to ByteBuffer, that can parse bit-sized data out of a set of | 21 // A class, similar to ByteBuffer, that can parse bit-sized data out of a set of |
| 22 // bytes. Has a similar API to ByteBuffer, plus methods for reading bit-sized | 22 // bytes. Has a similar API to ByteBuffer, plus methods for reading bit-sized |
| 23 // and exponential golomb encoded data. For a writable version, use | 23 // and exponential golomb encoded data. For a writable version, use |
| 24 // BitBufferWriter. Unlike ByteBuffer, this class doesn't make a copy of the | 24 // BitBufferWriter. Unlike ByteBuffer, this class doesn't make a copy of the |
| 25 // source bytes, so it can be used on read-only data. | 25 // source bytes, so it can be used on read-only data. |
| 26 // Sizes/counts specify bits/bytes, for clarity. | 26 // Sizes/counts specify bits/bytes, for clarity. |
| 27 // Byte order is assumed big-endian/network. | 27 // Byte order is assumed big-endian/network. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 private: | 117 private: |
| 118 // The buffer, as a writable array. | 118 // The buffer, as a writable array. |
| 119 uint8_t* const writable_bytes_; | 119 uint8_t* const writable_bytes_; |
| 120 | 120 |
| 121 RTC_DISALLOW_COPY_AND_ASSIGN(BitBufferWriter); | 121 RTC_DISALLOW_COPY_AND_ASSIGN(BitBufferWriter); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace rtc | 124 } // namespace rtc |
| 125 | 125 |
| 126 #endif // WEBRTC_RTC_BASE_BITBUFFER_H_ | 126 #endif // WEBRTC_RTC_BASE_BITBUFFER_H_ |
| OLD | NEW |