| Index: common/chunkstream/chunk.go
|
| diff --git a/common/chunkstream/chunk.go b/common/chunkstream/chunk.go
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3610e514c05af9184f0860ad106ee3f62b335fb2
|
| --- /dev/null
|
| +++ b/common/chunkstream/chunk.go
|
| @@ -0,0 +1,19 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +package chunkstream
|
| +
|
| +// Chunk wraps a fixed-size byte buffer. It is the primary interface used by
|
| +// the chunk library.
|
| +//
|
| +// A Chunk reference should be released once the user is finished with it. After
|
| +// being released, it may no longer be accessed.
|
| +type Chunk interface {
|
| + // Bytes returns the underlying byte slice contained by this Chunk.
|
| + Bytes() []byte
|
| +
|
| + // Release releases the Chunk. After being released, a Chunk's methods may no
|
| + // longer be used.
|
| + Release()
|
| +}
|
|
|