private int evictToRecoverBytes(int bytesToRecover) {
            int entriesToEvict = 0;
            if (bytesToRecover > 0) {
                // determine how many headers need to be evicted.
                for (int j = mDynamicTable.length - 1; j >= mNextHeaderIndex && bytesToRecover > 0; j--) {
                    bytesToRecover -= mDynamicTable[j].hpackSize();
                    mDynamicTableByteCount -= mDynamicTable[j].hpackSize();
                    mHeaderCount--;
                    entriesToEvict++;
                }
                System.arraycopy(mDynamicTable, mNextHeaderIndex + 1, mDynamicTable,
                        mNextHeaderIndex + 1 + entriesToEvict, mHeaderCount);
                Arrays.fill(mDynamicTable, mNextHeaderIndex + 1, mNextHeaderIndex + 1 + entriesToEvict, null);
                mNextHeaderIndex += entriesToEvict;
            }
            return entriesToEvict;
        }
Read and write HPACK v10.

https://httpwg.org/specs/rfc7540.html#HeaderBlock

This implementation uses an array for the dynamic table and a list for indexed entries.  Dynamic
entries are added to the array, starting in the last position moving forward.  When the array
fills, it is doubled.

@author Megatron King
@since 2019/1/5 20:13
netbare-core/src/main/java/com/github/megatronking/netbare/http2/Hpack.java