TODO(melvinw): add support for shifting at bit granularity Shifts `buf` to the left by `len` bytes and fills in with zeroes using std::memmove() and std::memset().
| 44 | // Shifts `buf` to the left by `len` bytes and fills in with zeroes using |
| 45 | // std::memmove() and std::memset(). |
| 46 | static inline void ShiftBytesLeftSmall(uint8_t *buf, const size_t len, |
| 47 | size_t shift) { |
| 48 | shift = std::min(shift, len); |
| 49 | memmove(buf, buf + shift, len - shift); |
| 50 | memset(buf + len - shift, 0, shift); |
| 51 | } |
| 52 | |
| 53 | // TODO(melvinw): add support for shifting at bit granularity |
| 54 | // Shifts `buf` to the left by `len` bytes and fills in with zeroes. |
no outgoing calls