<commit_before>#pragma once
#include <inttypes.h>
#include <string.h>

namespace Utils
{

	/**
	 * @brief performs an unaligned memory-access
	 */
	template<typename T>
	static void getUnaligned(T* dst, const void* src)
	{
		memcpy(dst, src, sizeof(T));
	}
}
<commit_msg>Added unaligned read<commit_after>#pragma once
#include <inttypes.h>
#include <string.h>

#if EMSCRIPTEN
#include <emscripten.h>
#endif

namespace Utils
{
#if EMSCRIPTEN
    typedef emscripten_align1_int unaligned_int32;
    typedef emscripten_align1_short unaligned_int16;
    typedef emscripten_align1_float unaligned_float;
#else
    typedef int32_t unaligned_int32;
    typedef int16_t unaligned_int16;
    typedef float unaligned_float;
#endif
	/**
	 * @brief performs an unaligned memory-access
	 */
	template<typename T>
	static void getUnaligned(T* dst, const void* src)
	{
		memcpy(dst, src, sizeof(T));
	}

    template<typename T>
    void unalignedRead(T& dst, const void*& src)
    {
        getUnaligned(&dst, src);
        uint8_t*& ptr = ((uint8_t*&)src);
        ptr += sizeof(T);
    }
}

{'fraction_non_alphanumeric': 0.11234911792014857, 'fraction_numerical': 0.015784586815227482, 'mean_word_length': 4.013953488372093, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2801992', 'n_tokens_mistral': 399, 'n_tokens_neox': 383, 'n_words': 94}