Overview
| Comment: | Additional fixes and code simplification for MinReader |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
70896f73e95a9811868d697c2c2f59eb |
| User & Date: | spaskalev on 2014-12-23 18:39:59.661 |
| Other Links: | manifest | tags |
Context
|
2014-12-23
| ||
| 18:52 | Renamed MinReader to BlockReader. The later is now used by predictor's decompressor to simplify the code and deal away with the need for internal buffering. check-in: 38f8e62c81 user: spaskalev tags: trunk | |
| 18:39 | Additional fixes and code simplification for MinReader check-in: 70896f73e9 user: spaskalev tags: trunk | |
| 14:27 | minReader fixes check-in: 4195e7817d user: spaskalev tags: trunk | |
Changes
Modified src/0dev.org/ioutil/ioutil.go
from [4d4fd7d642]
to [3d22f83cbe].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 | + | // Package ioutil contains various constructs for io operations package ioutil import ( //"fmt" "io" ) // An function alias type that implements io.Writer type WriterFunc func([]byte) (int, error) // Delegates the call to the WriterFunc while implementing io.Writer |
| ︙ | |||
22 23 24 25 26 27 28 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | - + - - + + + + - + - - - - - - + + + + + + + - - - + + + + - + - - - + + - + + - + - - - + |
}
// Returns a reader that will delegate calls to Read(...) while ensuring
// that the output buffer will never be smaller than the required size
func MinReader(reader io.Reader, size int) io.Reader {
var buffer []byte = make([]byte, 0, size)
|