TODO(melvinw): add support for shifting at bit granularity Shifts `buf` to the right by `len` bytes and fills in with zeroes using std::memmove() and std::memset().
| 82 | // Shifts `buf` to the right by `len` bytes and fills in with zeroes using |
| 83 | // std::memmove() and std::memset(). |
| 84 | static inline void ShiftBytesRightSmall(uint8_t *buf, const size_t len, |
| 85 | size_t shift) { |
| 86 | shift = std::min(shift, len); |
| 87 | memmove(buf + shift, buf, len - shift); |
| 88 | memset(buf, 0, shift); |
| 89 | } |
| 90 | |
| 91 | // TODO(melvinw): add support for shifting at bit granularity |
| 92 | // Shifts `buf` to the right by `len` bytes and fills in with zeroes. |
no outgoing calls