@Override
    public int decodeLongs(int valCount, long inputAddr, long outputAddr, int outputLimit) {
        if (valCount == 0) return 0;
        int dictEntriesCount = UnsafeUtil.getInt(inputAddr);
        int dictSize = dictEntriesCount << 3;
        long dictAddr = inputAddr + 4;

        ByteSlice dataEntryIds = ByteSlice.allocateDirect(valCount << 2);
        long encodeddataEntryIdsAddr = inputAddr + 4 + dictSize + 4;
        RLEPackingHybridCodec dataCodec = new RLEPackingHybridCodec(VarInteger.bitWidth(dictEntriesCount - 1));
        int consumedSize = dataCodec.decodeInts(
                valCount,
                encodeddataEntryIdsAddr,
                dataEntryIds.address(),
                dataEntryIds.size());
        if (consumedSize < 0) {
            dataEntryIds.free();
            return consumedSize;
        }

        for (int i = 0; i < valCount; i++) {
            int vid = dataEntryIds.getInt(i << 2);
            long v = getLong(dictAddr + (vid << 3));
            setLong(outputAddr + (i << 3), v);
        }

        dataEntryIds.free();

        return 4 + dictSize + 4 + consumedSize;
    }
<pre>
| dictSize |   dict   |  dataSize |  data(encoded ids) |
     4       dictSize       4           dataSize
</pre>
indexr-vlt-segment/src/main/java/io/indexr/vlt/codec/dict/SimpleDictCodec.java