+ if (dctx->hdist == 1 && dctx->lengths[dctx->hlit] == 0) {
+ /*
+ * Special case: if the code length list for the
+ * backward-distance table contains a single zero
+ * entry, it means this block will never encode a
+ * backward distance at all (i.e. it's all
+ * literals).
+ */
+ dctx->currdisttable = NULL;
+ } else {
+ dctx->currdisttable = mktable(dctx->lengths + dctx->hlit,
+ dctx->hdist,