<commit_before>// Own headers
#include "lz4_stream.h"

// Google test headers
#include <gtest/gtest.h>

// Standard headers
#include <random>
#include <algorithm>
#include <climits>
#include <iostream>
#include <sstream>

namespace
{
  size_t random_number(size_t max_size)
  {
    std::random_device rd;
    std::mt19937 mt(rd());
    return std::uniform_int_distribution<size_t>(0, max_size)(mt);
  }

  std::string random_string(size_t size)
  {
    using random_chars_engine = std::independent_bits_engine<
      std::default_random_engine, CHAR_BIT, unsigned char>;

    random_chars_engine rbe;
    std::string str;
    str.reserve(size);
    std::generate_n(std::back_inserter(str), size, std::ref(rbe));

    return str;
  }

  std::string compress_decompress_string(const std::string& input_string)<commit_msg>Use random engine correctly<commit_after>// Own headers
#include "lz4_stream.h"

// Google test headers
#include <gtest/gtest.h>

// Standard headers
#include <random>
#include <algorithm>
#include <climits>
#include <iostream>
#include <sstream>

namespace
{
  size_t random_number(size_t max_size)
  {
    std::random_device rd;
    std::mt19937 mt(rd());
    return std::uniform_int_distribution<size_t>(0, max_size)(mt);
  }

  std::string random_string(size_t size)
  {
    std::random_device rd;
    std::string str;
    str.reserve(size);
    std::generate_n(std::back_inserter(str), size, std::ref(rd));

    return str;
  }

  std::string compress_decompress_string(const std::string& input_string)
{'fraction_non_alphanumeric': 0.13237221494102228, 'fraction_numerical': 0.009174311926605505, 'mean_word_length': 4.895752895752896, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, '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': '4696775', 'n_tokens_mistral': 554, 'n_tokens_neox': 530, 'n_words': 109}