private static PackBundle _from_v1(int version,
                                       SegmentMode mode,
                                       List<UTF8String> strings,
                                       PackRSIndexStr index) {
        int size = strings.size();
        Preconditions.checkArgument(size > 0 && size <= DataPack.MAX_COUNT);

        int strTotalLen = 0;
        for (int i = 0; i < size; i++) {
            UTF8String s = strings.get(i);
            int byteCount = s.numBytes();
            Preconditions.checkState(byteCount <= MAX_STR_LEN_RAW, "string in utf-8 should be smaller than %s bytes", MAX_STR_LEN_RAW);
            strTotalLen += byteCount;

            index.putValue(s);
        }
        int indexLen = (size + 1) << 2;
        ByteSlice data = ByteSlice.allocateDirect(indexLen + strTotalLen);

        int offset = 0;
        for (int i = 0; i < size; i++) {
            UTF8String s = strings.get(i);
            byte[] bytes = s.getBytes();
            int byteLen = bytes.length;
            int start = offset;
            int end = start + byteLen;
            data.putInt(i << 2, start);
            data.putInt((i + 1) << 2, end);
            data.put(indexLen + start, bytes);

            offset = end;
        }

        DataPackNode_Basic dpn = (DataPackNode_Basic) mode.versionAdapter.createDPN(version, mode);
        dpn.setPackType(DataPackType.Raw);
        dpn.setObjCount(size);
        dpn.setMaxObjLen(0); // Always 0

        DataPack dataPack = new DataPack(data, null, dpn);
        dataPack.compress(ColumnType.STRING, false, dpn);

        PackExtIndex extIndex = mode.versionAdapter.createExtIndex(version, mode, ColumnType.STRING, false, dpn, dataPack, null);

        return new PackBundle(dataPack, dpn, index, extIndex);
    }
We encode the string as UTF-8.
indexr-segment/src/main/java/io/indexr/segment/pack/DataPackCreator_Basic.java