I found that ringbuf is twice larger than really needed.
Say, for lh5 the dictionary size is 8KiB. Given HISTORY_BITS=14, the maximum value returned by _read_offsetcode function is 8191, thus the max offset for a copy command is 8192. However, _lh_newdecoder.c creates ringbuf of size 1<<HISTORY_BITS, that is twice larger than needed.
I found that ringbuf is twice larger than really needed.
Say, for lh5 the dictionary size is 8KiB. Given HISTORY_BITS=14, the maximum value returned by _read_offsetcode function is 8191, thus the max offset for a copy command is 8192. However, _lh_newdecoder.c creates ringbuf of size 1<<HISTORY_BITS, that is twice larger than needed.