<commit_before>#pragma once

#include <warpcoil/cpp/parse_result.hpp>
#include <warpcoil/cpp/parser_for.hpp>
#include <silicium/source/source.hpp>
#include <silicium/sink/sink.hpp>
#include <silicium/sink/append.hpp>

namespace warpcoil
{
    namespace cpp
    {
        template <class Unsigned>
        Unsigned read_integer(Si::Source<std::uint8_t>::interface &from)
        {
            Unsigned result = 0;
            for (std::size_t i = 0; i < sizeof(result); ++i)
            {
                result = static_cast<std::uint8_t>(result << 8u);
                result = static_cast<std::uint8_t>(result |
                                                   Si::get(from).or_throw([]
                                                                          {
                                                                              throw std::runtime_error(
                                                                                  "unexpected end of the response");
                                                                          }));
            }
            return result;
        }

        template <class Unsigned>
        void write_integer(Si::Sink<std::uint8_t>::interface &to, Unsigned const value)
        {
            std::array<std::uint8_t, sizeof(value)> bytes;
            for (std::size_t i = 0; i < sizeof(value); ++i)<commit_msg>maybe this helps with GCC<commit_after>#pragma once

#include <warpcoil/cpp/parse_result.hpp>
#include <warpcoil/cpp/parser_for.hpp>
#include <silicium/source/source.hpp>
#include <silicium/sink/sink.hpp>
#include <silicium/sink/append.hpp>
#include <type_traits>

namespace warpcoil
{
    namespace cpp
    {
        template <class Unsigned>
        Unsigned read_integer(Si::Source<std::uint8_t>::interface &from)
        {
            Unsigned result = 0;
            for (std::size_t i = 0; i < sizeof(result); ++i)
            {
                result = static_cast<std::uint8_t>(result << 8u);
                result = static_cast<std::uint8_t>(result |
                                                   Si::get(from).or_throw([]
                                                                          {
                                                                              throw std::runtime_error(
                                                                                  "unexpected end of the response");
                                                                          }));
            }
            return result;
        }

        template <class Unsigned>
        void write_integer(Si::Sink<std::uint8_t>::interface &to, Unsigned const value)
        {
            std::array<std::uint8_t, sizeof(value)> bytes;
            for (std::size_t i = 0; i < sizeof(value); ++i)
{'fraction_non_alphanumeric': 0.1026099392205935, 'fraction_numerical': 0.006435466571326421, 'mean_word_length': 1.1706749418153608, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3929162', 'n_tokens_mistral': 697, 'n_tokens_neox': 681, 'n_words': 137}