private void setUpShallowKey(Exchange ex, int value, long pointer) {
        byte[] bytes = ex.getKey().clear().getEncodedBytes();
        Arrays.fill(bytes, (byte) 0);
        /*
         * Convert int to little-endian form so that byte 0 varies fastest. 7
         * bits per byte, no zeroes.
         */
        bytes[0] = (byte) (((value >>> 0) & 0x7F) + 1);
        bytes[1] = (byte) (((value >>> 7) & 0x7F) + 1);
        bytes[2] = (byte) (((value >>> 14) & 0x7F) + 1);
        bytes[3] = (byte) (((value >>> 21) & 0x7F) + 1);
        bytes[5] = (byte) (((value >>> 28) & 0x7F) + 1);
        ex.getKey().setEncodedSize(6);
        ex.getValue().setPointerValue(pointer);
    }