| 432 | } |
| 433 | |
| 434 | uint8_t * |
| 435 | huffman_encode_append(uint8_t *dst, uint32_t src, int n = 0) |
| 436 | { |
| 437 | for (int j = 3; j >= n; --j) { |
| 438 | *dst++ = ((src >> (8 * j)) & 255); |
| 439 | } |
| 440 | return dst; |
| 441 | } |
| 442 | |
| 443 | int64_t |
| 444 | huffman_encode(uint8_t *dst_start, const uint8_t *src, uint32_t src_len) |