Overview
Comment: | Removed err variable from compressor |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
0f4bc650d1a9c78739435916114e097b |
User & Date: | spaskalev on 2014-12-16 23:29:42 |
Other Links: | manifest | tags |
Context
2014-12-19
| ||
21:54 | Implemented commands/pdc using predictor. Made predictor's Compressor(...) return an io.Writer. check-in: c9f3a59cb6 user: spaskalev tags: trunk | |
2014-12-16
| ||
23:29 | Removed err variable from compressor check-in: 0f4bc650d1 user: spaskalev tags: trunk | |
22:56 | Reworked the compressor's buffering code, switched to table testing, add step testing for the compressor. Code coverage at 88.3% check-in: 1847f77062 user: spaskalev tags: trunk | |
Changes
Modified src/0dev.org/predictor/predictor.go from [2d1c692ccb] to [2cc1907fb9].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | - | ctx.input = ctx.buffer[:0] // Forward declaration as it is required for recursion var write func(data []byte) error write = func(data []byte) error { var ( |
︙ | |||
55 56 57 58 59 60 61 | 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 | - + - + - + - - - + - - + | // ... otherwise just return return nil } // The current buffer + new data overflow the block size // Complete the block, flush it ... ctx.input = append(ctx.input, data[:blockSize-bufferLength]...) |
︙ |