<commit_before>package stroom.refdata.offheapstore.serdes;

import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryo.Serializer;
import com.esotericsoftware.kryo.io.Input;
import com.esotericsoftware.kryo.io.Output;

import java.util.UUID;

/**
 * Kryo serializer for a string representation of a {@link UUID}. The string form must
 * conform to the output generated by {@link UUID#toString()}. May use variable length
 * serialisation.
 */
class UUIDKryoSerializer extends Serializer<String> {

    @Override
    public void write(final Kryo kryo, final Output output, final String uuidStr) {
        UUID uuid = UUID.fromString(uuidStr);
        output.writeLong(uuid.getMostSignificantBits(), false);
        output.writeLong(uuid.getLeastSignificantBits(), false);
    }

    @Override
    public String read(final Kryo kryo, final Input input, final Class<String> type) {
        final long uuidHighBits = input.readLong(false);
        final long uuidLowBits = input.readLong(false);
        return new UUID(uuidHighBits, uuidLowBits).toString();
    }
}
<commit_msg>gh-722 Add TODO<commit_after>package stroom.refdata.offheapstore.serdes;

import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryo.Serializer;
import com.esotericsoftware.kryo.io.Input;
import com.esotericsoftware.kryo.io.Output;

import java.util.UUID;

/**
 * Kryo serializer for a string representation of a {@link UUID}. The string form must
 * conform to the output generated by {@link UUID#toString()}. May use variable length
 * serialisation.
 */
// TODO create two versions of ths class, one for variable length and the other for fixed length
class UUIDKryoSerializer extends Serializer<String> {

    @Override
    public void write(final Kryo kryo, final Output output, final String uuidStr) {
        UUID uuid = UUID.fromString(uuidStr);
        output.writeLong(uuid.getMostSignificantBits(), false);
        output.writeLong(uuid.getLeastSignificantBits(), false);
    }

    @Override
    public String read(final Kryo kryo, final Input input, final Class<String> type) {
        final long uuidHighBits = input.readLong(false);
        final long uuidLowBits = input.readLong(false);
        return new UUID(uuidHighBits, uuidLowBits).toString();
    }
}

{'fraction_non_alphanumeric': 0.09494505494505495, 'fraction_numerical': 0.0013186813186813187, 'mean_word_length': 4.057777777777778, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2375291', 'n_tokens_mistral': 702, 'n_tokens_neox': 695, 'n_words': 191}