| 37 | } |
| 38 | |
| 39 | void printBitsBig(size_t const size, void const* const ptr) { |
| 40 | unsigned char* b = (unsigned char*)ptr; |
| 41 | unsigned char byte; |
| 42 | int i, j; |
| 43 | |
| 44 | for (i = 0; i < size; ++i) { |
| 45 | for (j = 7; j >= 0; j--) { |
| 46 | byte = (b[i] >> j) & 1; |
| 47 | printf("%u", byte); |
| 48 | } |
| 49 | printf(" "); |
| 50 | } |
| 51 | puts(""); |
| 52 | } |
| 53 | |
| 54 | template <typename IntType> |
| 55 | void testCompressedInt(IntType n, StringRef rep = StringRef()) { |
no test coverage detected