Differences From Artifact [e648d95cb9]:
- File
src/huffman_tree.m
— part of check-in
[6a0bf8be32]
at
2019-03-20 21:04:36
on branch trunk
— Force inline tryReadBits and of_huffman_tree_walk
This gives a significant performance improvement, cutting decompression
time almost in half. (user: js, size: 3072) [annotate] [blame] [check-ins using]
To Artifact [960a2e3958]:
- File src/huffman_tree.m — part of check-in [b7badc68a0] at 2019-09-01 15:20:30 on branch trunk — Use u suffix on a few constants (user: js, size: 3073) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
44 45 46 47 48 49 50 | insertTree(struct of_huffman_tree *tree, uint16_t code, uint8_t length, uint16_t value) { while (length > 0) { uint8_t bit; length--; | | | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | insertTree(struct of_huffman_tree *tree, uint16_t code, uint8_t length, uint16_t value) { while (length > 0) { uint8_t bit; length--; bit = (code & (1u << length)) >> length; if (tree->leaves[bit] == NULL) tree->leaves[bit] = newTree(); tree = tree->leaves[bit]; } |
︙ | ︙ |