Overview
Comment: | Integrate the decompressor2 branch into trunk now that it is faster. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
6d10a1d28facd4fe7120f66a985041bd |
User & Date: | spaskalev on 2014-12-22 16:41:58 |
Other Links: | manifest | tags |
Context
2014-12-22
| ||
17:15 | Calculate the decompressed block length outside of the predictor loop check-in: 27ecac81d3 user: spaskalev tags: trunk | |
16:41 | Integrate the decompressor2 branch into trunk now that it is faster. check-in: 6d10a1d28f user: spaskalev tags: trunk | |
16:35 | Decompressor - try to fill as much as possible in the output buffer in a single pass. Closed-Leaf check-in: 42ba1f458d user: spaskalev tags: decompressor2 | |
2014-12-21
| ||
23:24 | The decompressor now tries to fill in the whole output buffer in a single call. check-in: 1f73d90f65 user: spaskalev tags: trunk | |
Changes
Modified src/0dev.org/predictor/predictor.go from [9dfe9174f8] to [71e92568a2].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | + | // Package predictor implements the predictor compression/decompression algorithm // as specified by RFC1978 - PPP Predictor Compression Protocol package predictor import ( bits "0dev.org/bits" "io" ) type context struct { table [1 << 16]byte input []byte hash uint16 |
︙ | |||
120 121 122 123 124 125 126 | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | - - - + + + - - + + + - + - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - + + + - - + + + - - - + + + - - + - - - + + | // and decompresses data according to the predictor algorithm func Decompressor(reader io.Reader) io.Reader { var ctx context ctx.input = make([]byte, 0, 8) return decompressor(func(output []byte) (int, error) { var ( |