Unpack the offset to the next node. The encoding scheme can store offsets up to 7 bytes; whether they fit into size_t is another issue.
| 104 | // Unpack the offset to the next node. The encoding scheme can store offsets |
| 105 | // up to 7 bytes; whether they fit into size_t is another issue. |
| 106 | Y_FORCE_INLINE size_t UnpackOffset(const char* p, size_t len) { |
| 107 | size_t result = 0; |
| 108 | |
| 109 | while (len--) |
| 110 | result = ((result << 8) | (*(p++) & 0xFF)); |
| 111 | |
| 112 | return result; |
| 113 | } |
| 114 | |
| 115 | // Auxiliary function: consumes one character from the input. Advances the data pointer |
| 116 | // to the position immediately preceding the value for the link just traversed (if any); |
no outgoing calls
no test coverage detected