public final void encodeVarBits(final int value) {
        if ((value & 0xfff) == value) {
            flushBuffer();
            b |= vc_values[value] << bits;
            bits += vc_length[value];
        } else {
            encodeVarBits2(value); // slow fallback for large values
        }
    }
encode a distance with a variable bit length
(poor mans huffman tree)
{@code 1 -> 0}
{@code 01 -> 1} + following 1-bit word ( 1..2 )
{@code 001 -> 3} + following 2-bit word ( 3..6 )
{@code 0001 -> 7} + following 3-bit word ( 7..14 ) etc.

@see #decodeVarBits
main/src/main/java/cgeo/geocaching/brouter/util/BitCoderContext.java