Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 package chunkstream | |
| 6 | |
| 7 // Chunk wraps a fixed-size byte buffer. It is the primary interface used by | |
| 8 // the chunk library. | |
| 9 // | |
| 10 // A Chunk reference should be released once the user is finished with it. After | |
| 11 // being released, it may no longer be accessed. | |
| 12 type Chunk interface { | |
|
iannucci
2015/11/05 01:10:08
Is this intended to be used outside of the package
dnj
2015/11/13 23:22:03
I'm going to kill Len().
| |
| 13 // Bytes returns the underlying byte slice contained by this Chunk. | |
| 14 Bytes() []byte | |
| 15 // Len returns the length of the underlying byte slice. | |
| 16 Len() int | |
|
iannucci
2015/11/05 01:10:07
maybe no Len() and then put Len() on chunkNode
dnj
2015/11/13 23:22:03
Done.
| |
| 17 | |
| 18 // Release releases the Chunk. After being released, a Chunk's methods m ay no | |
| 19 // longer be used. | |
| 20 Release() | |
| 21 } | |
| OLD | NEW |