#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/speech/chunked_byte_buffer.h"
#include <algorithm>
#include <memory>
#include <string_view>
#include <utility>
#include "base/check_op.h"
#include "base/containers/span.h"
#include "base/lazy_instance.h"
#include "base/numerics/byte_conversions.h"
namespace {
static const size_t kHeaderLength = …;
static_assert …;
}
namespace speech {
ChunkedByteBuffer::ChunkedByteBuffer()
: … { … }
ChunkedByteBuffer::~ChunkedByteBuffer() { … }
void ChunkedByteBuffer::Append(const uint8_t* start, size_t length) { … }
void ChunkedByteBuffer::Append(std::string_view string) { … }
bool ChunkedByteBuffer::HasChunks() const { … }
std::unique_ptr<std::vector<uint8_t>> ChunkedByteBuffer::PopChunk() { … }
void ChunkedByteBuffer::Clear() { … }
ChunkedByteBuffer::Chunk::Chunk() : … { … }
ChunkedByteBuffer::Chunk::~Chunk() { … }
size_t ChunkedByteBuffer::Chunk::ExpectedContentLength() const { … }
}