<commit_before>

#include "Buffer.h"
namespace OpenClouds
{
	void Buffer::Seek(BufferSeek seek, const int offset)
	{
		switch (seek)
		{
		case BufferSeek::Start:
			index = offset;
			break;
		case BufferSeek::Relative:
			index += offset;
			break;
		case BufferSeek::End:
			index = size + offset; //WARNING: OUT OF BOUND
			break;
		}
	}

	void Buffer::Seek(const int position)
	{
		index = position;
	}

	void Buffer::Clear()
	{
		//memfree(data)
		index = 0;
	}

	int Buffer::GetIndex() const
	{
		return index;
	}

	int Buffer::GetSize() const
	{
		return index;
	}


	void Buffer::WriteInt32(const int32_t value)
	{
		int diff = size - index;

		if (diff >= sizeof(int32_t))
		{
			data[index++] = value;
			data[index++] = (value >> 1);
			data[index++] = (value >> 2);
			data[index++] = (value >> 3);
		}
		else
		{
			//resize the data buffer
		}
	}


}<commit_msg> Implemented methods in Buffer.cpp, Added a new Buffer::Seek overload<commit_after>

#include "Buffer.h"
namespace OpenClouds
{
	void Buffer::Seek(BufferSeek seek, const int offset)
	{
		switch (seek)
		{
		case BufferSeek::Start:
			index = offset;
			break;
		case BufferSeek::Relative:
			index += offset;
			break;
		case BufferSeek::End:
			index = size + offset; //WARNING: OUT OF BOUND
			break;
		}
	}

	void Buffer::Seek(const int position)
	{
		index = position;
	}

	void Buffer::Clear()
	{
		//memfree(data)
		index = 0;
	}

	int Buffer::GetIndex() const
	{
		return index;
	}

	int Buffer::GetSize() const
	{
		return index;
	}


	void Buffer::WriteInt32(const int32_t value)
	{
		int diff = size - (index + 1);

		if (diff >= sizeof(int32_t))
		{
			data[index++] = value;
			data[index++] = (value >> 1);
			data[index++] = (value >> 2);
			data[index++] = (value >> 3);
		}
		else
		{
			//resize the data buffer
		}
	}


}
{'fraction_non_alphanumeric': 0.15143171806167402, 'fraction_numerical': 0.011563876651982379, 'mean_word_length': 2.9934065934065934, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '1843651', 'n_tokens_mistral': 792, 'n_tokens_neox': 677, 'n_words': 172}