private void writeInt(int value, int prefixMask, int bits) {
            // Write the raw value for a single byte value.
            if (value < prefixMask) {
                mOut.write(bits | value);
                return;
            }

            // Write the mask to start a multibyte value.
            mOut.write(bits | prefixMask);
            value -= prefixMask;

            // Write 7 bits at a time 'til we're done.
            while (value >= 0x80) {
                int b = value & 0x7f;
                mOut.write(b | 0x80);
                value >>>= 7;
            }
            mOut.write(value);
        }
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