chromium/components/zucchini/buffer_sink.h

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_ZUCCHINI_BUFFER_SINK_H_
#define COMPONENTS_ZUCCHINI_BUFFER_SINK_H_

#include <stdint.h>
#include <string.h>

#include <algorithm>
#include <iterator>

#include "base/check_op.h"
#include "components/zucchini/buffer_view.h"

namespace zucchini {

// BufferSink acts like an output stream with convenience methods to serialize
// data into a contiguous sequence of raw data. The underlying MutableBufferView
// emulates a cursor to track current write position, and guards against buffer
// overrun. Where applicable, BufferSink should be passed by pointer to maintain
// cursor progress across writes.
class BufferSink : public MutableBufferView {};

}  // namespace zucchini

#endif  // COMPONENTS_ZUCCHINI_BUFFER_SINK_H_