Overview
Comment: | Extracted SizedWriter to a sizedWriter struct with a Write() method. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
46da7a6ae933a799da23fba4c3d096e5 |
User & Date: | spaskalev on 2014-12-25 00:26:02 |
Other Links: | manifest | tags |
Context
2014-12-25
| ||
00:43 | Extracted predictor's compressor and decompressor code into separate structs that embed Sized{Writer,Reader} check-in: 50507bd510 user: spaskalev tags: trunk | |
00:26 | Extracted SizedWriter to a sizedWriter struct with a Write() method. check-in: 46da7a6ae9 user: spaskalev tags: trunk | |
2014-12-24
| ||
23:58 | 0dev.org/ioutil/SizedReader is now as fast as bufio.Reader if not faster for a buffer of 4096 bytes. Switched pdc to use it for decompression buffering and removed profiling code from the former check-in: 2cec92909f user: spaskalev tags: trunk | |
Changes
Modified src/0dev.org/ioutil/ioutil.go from [9862ea3396] to [c11fdb5a53].
︙ | |||
23 24 25 26 27 28 29 | 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 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | + + - - - - + + + + + + + + + + + + - + - + - - - + + + - + - - + + - + - + - + - - - - - - - - - + + + + + + | // Returns a writer that delegates calls to Write(...) while ensuring // that it is never called with less bytes than the specified amount. // // Calls with fewer bytes are buffered while a call with a nil slice // causes the buffer to be flushed to the underlying writer. func SizedWriter(writer io.Writer, size int) io.Writer { var sw sizedWriter sw.writer = writer |
︙ |