<commit_before>#include "stdafx.h"
#include "packet.h"
#include "MapleStructs.h"

extern void log(const std::string& message);

packet::packet() : should_be_parsed_(false) {}

packet::packet(uint16_t header) : packet()
{
	encode2(header);
}

void packet::encode1(uint8_t data)
{
	return encode(data);
}

void packet::encode2(uint16_t data)
{
	return encode(data);
}

void packet::encode4(uint32_t data)
{
	return encode(data);
}

void packet::encode8(uint64_t data)
{
	return encode(data);
}

void packet::encode_string(std::string data)
{
	encode2(data.size());
	data_.insert(data_.end(), data.begin(), data.end());
}

void packet::encode_data(std::initializer_list<uint8_t> data)<commit_msg>Fixed compiler warning in encode_string<commit_after>#include "stdafx.h"
#include "packet.h"
#include "MapleStructs.h"

extern void log(const std::string& message);

packet::packet() : should_be_parsed_(false) {}

packet::packet(uint16_t header) : packet()
{
	encode2(header);
}

void packet::encode1(uint8_t data)
{
	return encode(data);
}

void packet::encode2(uint16_t data)
{
	return encode(data);
}

void packet::encode4(uint32_t data)
{
	return encode(data);
}

void packet::encode8(uint64_t data)
{
	return encode(data);
}

void packet::encode_string(std::string data)
{
	encode2(static_cast<uint16_t>(data.size()));
	data_.insert(data_.end(), data.begin(), data.end());
}

void packet::encode_data(std::initializer_list<uint8_t> data)
{'fraction_non_alphanumeric': 0.16306620209059233, 'fraction_numerical': 0.023693379790940768, 'mean_word_length': 7.2057142857142855, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '3918907', 'n_tokens_mistral': 545, 'n_tokens_neox': 534, 'n_words': 97}