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_offset_code function is 8191, thus the max offset for a copy command is 8192. However, lh_new_decoder.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_offset_code function is 8191, thus the max offset for a copy command is 8192. However, lh_new_decoder.c creates ringbuf of size 1<<HISTORY_BITS, that is twice larger than needed.