| 50 | } |
| 51 | |
| 52 | static uint32_t atLestBitsCnt(uint32_t n) { |
| 53 | for (uint32_t i = 0; i < 32; i++) { |
| 54 | int32_t t = n << i; |
| 55 | if (t < 0) |
| 56 | return 32 - i - (((t << 1) == 0) ? 1 : 0); |
| 57 | } |
| 58 | return 0; |
| 59 | } |
| 60 | |
| 61 | static void SplitBufToArray(uint8_t *buf, size_t bufLen, uint8_t *arr, size_t arrLen, size_t iNeedBits) { |
| 62 | unsigned char cMask = (1 << (iNeedBits)) - 1; |
no outgoing calls
no test coverage detected