- Compressed data is output as groups of 8 1-byte opcodes
- followed by up to 8 (depending on the opcodes) 8-byte data
- items. Data items and opcodes arrive at the same time but
- must be reordered for writing to disk, thus a small amount
- of buffering here. */
- uint8_t opcodes[8]; /* Buffered opcodes. */
- int opcode_cnt; /* Number of buffered opcodes. */
- uint8_t data[8][8]; /* Buffered data. */
- int data_cnt; /* Number of buffered data items. */
+ Compressed data is output as a series of 8-byte elements, with 1 to 9
+ such elements clustered together. The first element in a cluster is 8
+ 1-byte opcodes. Some opcodes call for an additional element in the
+ cluster (hence, if there are eight such opcodes, then the cluster
+ contains a full 9 elements).
+
+ cbuf[] holds a cluster at a time. */
+ uint8_t cbuf[9][8];
+ int n_opcodes; /* Number of opcodes in cbuf[0] so far. */
+ int n_elements; /* Number of elements in cbuf[] so far. */