+
+ union {
+ /* Data for greedy or lazy parsing */
+ struct {
+ /* Hash chains matchfinder (MUST BE LAST!!!) */
+ struct hc_matchfinder hc_mf;
+ };
+
+ /* Data for near-optimal parsing */
+ struct {
+ /*
+ * The graph nodes for the current block.
+ *
+ * We need at least 'LZX_DIV_BLOCK_SIZE +
+ * LZX_MAX_MATCH_LEN - 1' nodes because that is the
+ * maximum block size that may be used. Add 1 because
+ * we need a node to represent end-of-block.
+ *
+ * It is possible that nodes past end-of-block are
+ * accessed during match consideration, but this can
+ * only occur if the block was truncated at
+ * LZX_DIV_BLOCK_SIZE. So the same bound still applies.
+ * Note that since nodes past the end of the block will
+ * never actually have an effect on the items that are
+ * chosen for the block, it makes no difference what
+ * their costs are initialized to (if anything).
+ */
+ struct lzx_optimum_node optimum_nodes[LZX_DIV_BLOCK_SIZE +
+ LZX_MAX_MATCH_LEN - 1 + 1];
+
+ /* The cost model for the current block */
+ struct lzx_costs costs;
+
+ /*
+ * Cached matches for the current block. This array
+ * contains the matches that were found at each position
+ * in the block. Specifically, for each position, there
+ * is a special 'struct lz_match' whose 'length' field
+ * contains the number of matches that were found at
+ * that position; this is followed by the matches
+ * themselves, if any, sorted by strictly increasing
+ * length.
+ *
+ * Note: in rare cases, there will be a very high number
+ * of matches in the block and this array will overflow.
+ * If this happens, we force the end of the current
+ * block. LZX_CACHE_LENGTH is the length at which we
+ * actually check for overflow. The extra slots beyond
+ * this are enough to absorb the worst case overflow,
+ * which occurs if starting at
+ * &match_cache[LZX_CACHE_LENGTH - 1], we write the
+ * match count header, then write
+ * LZX_MAX_MATCHES_PER_POS matches, then skip searching
+ * for matches at 'LZX_MAX_MATCH_LEN - 1' positions and
+ * write the match count header for each.
+ */
+ struct lz_match match_cache[LZX_CACHE_LENGTH +
+ LZX_MAX_MATCHES_PER_POS +
+ LZX_MAX_MATCH_LEN - 1];
+
+ /* Hash table for finding length 2 matches */
+ pos_t hash2_tab[LZX_HASH2_LENGTH]
+ _aligned_attribute(MATCHFINDER_ALIGNMENT);
+
+ /* Binary trees matchfinder (MUST BE LAST!!!) */
+ struct bt_matchfinder bt_mf;
+ };
+ };