<commit_before>package rs.emulate.legacy.config.obj

import io.netty.buffer.ByteBuf
import rs.emulate.legacy.config.Config
import rs.emulate.legacy.config.ConfigDecoder
import rs.emulate.util.readAsciiString

object ObjectDefinitionDecoder : ConfigDecoder<ObjectDefinition> {

    override val entryName: String = "seq"

    override fun decode(id: Int, buffer: ByteBuf): ObjectDefinition {
        val definition = ObjectDefinition(id)
        var opcode = buffer.readUnsignedByte().toInt()

        while (opcode != Config.DEFINITION_TERMINATOR) {
            definition.decode(buffer, opcode)
            opcode = buffer.readUnsignedByte().toInt()
        }<commit_msg>Fix item definition decoding<commit_after>package rs.emulate.legacy.config.obj

import io.netty.buffer.ByteBuf
import rs.emulate.legacy.config.Config
import rs.emulate.legacy.config.ConfigDecoder
import rs.emulate.util.readAsciiString

object ObjectDefinitionDecoder : ConfigDecoder<ObjectDefinition> {

    override val entryName: String = "obj"

    override fun decode(id: Int, buffer: ByteBuf): ObjectDefinition {
        val definition = ObjectDefinition(id)
        var opcode = buffer.readUnsignedByte().toInt()

        while (opcode != Config.DEFINITION_TERMINATOR) {
            definition.decode(buffer, opcode)
            opcode = buffer.readUnsignedByte().toInt()
        }
{'fraction_non_alphanumeric': 0.094186902133922, 'fraction_numerical': 0.0, 'mean_word_length': 3.788732394366197, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6650466', 'n_tokens_mistral': 389, 'n_tokens_neox': 378, 'n_words': 79}