Overview
| Comment: | [mtf] Removed :to indices from copy(..) destinations. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
c07658474d008175c434b4df63ed8c1f |
| User & Date: | spaskalev on 2014-12-28 18:06:19.122 |
| Other Links: | manifest | tags |
Context
|
2014-12-30
| ||
| 14:03 | Added encoding/fibonacci (cc: 100%) check-in: 7a1684ea05 user: spaskalev tags: trunk | |
|
2014-12-28
| ||
| 18:06 | [mtf] Removed :to indices from copy(..) destinations. check-in: c07658474d user: spaskalev tags: trunk | |
| 17:19 | Integrate ioutil.ReadByte from the bpe branch into trunk. check-in: 00c4e0e448 user: spaskalev tags: trunk | |
Changes
Modified src/0dev.org/mtf/mtf.go
from [4488b5a476]
to [f2ad12a795].
| ︙ | |||
64 65 66 67 68 69 70 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | - + |
// Loop over the MTF table
for j := byte(1); j != 0; j++ {
if c.table[j] == value {
// Output the value
buffer[index] = j
// Shift the table
|
| ︙ | |||
111 112 113 114 115 116 117 | 111 112 113 114 115 116 117 118 119 120 121 122 123 | - + | continue } // Output the value output[i] = c.table[position] // Shift the table and restore the value in front |