OCTAGRAM wrapper with surrounding spaces Pick up 1..24 bytes plus pre/post space and hash them via mask/shift/add UNDERSHOOTS 1 byte, OVERSHOOTS up to 3 bytes The low 32 bits follow the pattern from above, tuned to different scripts The high 8 bits are a simple sum of all bytes, shifted by 0/1/2/3 bits each For runtime use of tables V3
| 346 | // The high 8 bits are a simple sum of all bytes, shifted by 0/1/2/3 bits each |
| 347 | // For runtime use of tables V3 |
| 348 | uint64 OctaHash40(const char* word_ptr, int bytecount) { |
| 349 | if (bytecount == 0) {return 0;} |
| 350 | uint64 prepost = 0; |
| 351 | if (word_ptr[-1] == ' ') {prepost |= kPreSpaceIndicator;} |
| 352 | if (word_ptr[bytecount] == ' ') {prepost |= kPostSpaceIndicator;} |
| 353 | return OctaHash40Mix(word_ptr, bytecount, prepost); |
| 354 | } |
| 355 | |
| 356 | |
| 357 | // OCTAGRAM wrapper with surrounding underscores (offline use) |
no test coverage detected