<commit_before>
#include"chunk_processor.hpp"
#include"chunk_handlers.hpp"
#include"chunk_headers.hpp"
#include"file_saver.hpp"
#include"magic_number.hpp"
#include"type_pun.hpp"

#include"tbb/task_group.h"

using namespace std::literals;

void process_chunk(const chunks::Unknown& chunk,
                   File_saver& file_saver,
                   tbb::task_group& tasks,
                   msh::Builders_map& msh_builders)
{
   if (chunk.mn == "ucfb"_mn) {
      tasks.run([&] {handle_ucfb(view_type_as<chunks::Ucfb>(chunk),
                                 file_saver,
                                 tasks,
                                 msh_builders); });
   }
   else if (chunk.mn == "lvl_"_mn) {
      tasks.run([&] {handle_lvl_child(view_type_as<chunks::Child_lvl>(chunk),
                                      file_saver,
                                      tasks,
                                      msh_builders); });
   }
   //Object chunks
   else if (chunk.mn == "entc"_mn) {
      tasks.run([&] {handle_object(view_type_as<chunks::Object>(chunk),
                                   file_saver,
                                   "GameObjectClass"s); });
      }
   else if (chunk.mn == "expc"_mn) {
      tasks.run([&] {handle_object(view_type_as<chunks::Object>(chunk),
                                   file_saver,
                                   "ExplosionClass"s); });
   }
   else if (chunk.mn == "ordc"_mn) {
      tasks.run([&] {handle_object(view_type_as<chunks::Object>(chunk),
                                   file_saver,
                                   "OrdnanceClass"s); });
   }
   else if (chunk.mn == "wpnc"_mn) {
      tasks.run([&] {handle_object(view_type_as<chunks::Object>(chunk),
                                   file_saver,
                                 "WeaponClass"s); });
   }
   //Config chunks
   else if (chunk.mn == "fx__"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".fx",
                                   "effects"); });
   }
   else if (chunk.mn == "sky_"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".sky",
                                   "world"); });
   }
   else if (chunk.mn == "prp_"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".prp",
                                   "world",
                                   true); });
   }
   else if (chunk.mn == "bnd_"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".bnd",
                                   "world",
                                   true); });
   }
   else if (chunk.mn == "lght"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".light",
                                   "world"); });
   }
   else if (chunk.mn == "port"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".pvs",
                                   "world"); });
   }
   else if (chunk.mn == "path"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".pth",
                                   "world"); });
   }
   else if (chunk.mn == "comb"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".combo",
                                   "combos"); });
   }
   else if (chunk.mn == "sanm"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".sanm",
                                   "config"); });
   }
   else if (chunk.mn == "hud_"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".hud",
                                   "config"); });
   }
   //Texture chunks
   else if (chunk.mn == "tex_"_mn) {
      tasks.run([&] {handle_texture(view_type_as<chunks::Texture>(chunk),
                                    file_saver); });
   }
   //World chunks
   else if (chunk.mn == "wrld"_mn) {<commit_msg>Added config handler for load chunks.<commit_after>
#include"chunk_processor.hpp"
#include"chunk_handlers.hpp"
#include"chunk_headers.hpp"
#include"file_saver.hpp"
#include"magic_number.hpp"
#include"type_pun.hpp"

#include"tbb/task_group.h"

using namespace std::literals;

void process_chunk(const chunks::Unknown& chunk,
                   File_saver& file_saver,
                   tbb::task_group& tasks,
                   msh::Builders_map& msh_builders)
{
   if (chunk.mn == "ucfb"_mn) {
      tasks.run([&] {handle_ucfb(view_type_as<chunks::Ucfb>(chunk),
                                 file_saver,
                                 tasks,
                                 msh_builders); });
   }
   else if (chunk.mn == "lvl_"_mn) {
      tasks.run([&] {handle_lvl_child(view_type_as<chunks::Child_lvl>(chunk),
                                      file_saver,
                                      tasks,
                                      msh_builders); });
   }
   //Object chunks
   else if (chunk.mn == "entc"_mn) {
      tasks.run([&] {handle_object(view_type_as<chunks::Object>(chunk),
                                   file_saver,
                                   "GameObjectClass"s); });
      }
   else if (chunk.mn == "expc"_mn) {
      tasks.run([&] {handle_object(view_type_as<chunks::Object>(chunk),
                                   file_saver,
                                   "ExplosionClass"s); });
   }
   else if (chunk.mn == "ordc"_mn) {
      tasks.run([&] {handle_object(view_type_as<chunks::Object>(chunk),
                                   file_saver,
                                   "OrdnanceClass"s); });
   }
   else if (chunk.mn == "wpnc"_mn) {
      tasks.run([&] {handle_object(view_type_as<chunks::Object>(chunk),
                                   file_saver,
                                 "WeaponClass"s); });
   }
   //Config chunks
   else if (chunk.mn == "fx__"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".fx",
                                   "effects"); });
   }
   else if (chunk.mn == "sky_"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".sky",
                                   "world"); });
   }
   else if (chunk.mn == "prp_"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".prp",
                                   "world",
                                   true); });
   }
   else if (chunk.mn == "bnd_"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".bnd",
                                   "world",
                                   true); });
   }
   else if (chunk.mn == "lght"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".light",
                                   "world"); });
   }
   else if (chunk.mn == "port"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".pvs",
                                   "world"); });
   }
   else if (chunk.mn == "path"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".pth",
                                   "world"); });
   }
   else if (chunk.mn == "comb"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".combo",
                                   "combos"); });
   }
   else if (chunk.mn == "sanm"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".sanm",
                                   "config"); });
   }
   else if (chunk.mn == "hud_"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".hud",
                                   "config"); });
   }
   else if (chunk.mn == "load"_mn) {
      tasks.run([&] {handle_config(view_type_as<chunks::Config>(chunk),
                                   file_saver,
                                   ".cfg",
                                   "load"); });
   }
   //Texture chunks
   else if (chunk.mn == "tex_"_mn) {
      tasks.run([&] {handle_texture(view_type_as<chunks::Texture>(chunk),
                                    file_saver); });
   }
   //World chunks
   else if (chunk.mn == "wrld"_mn) {
{'fraction_non_alphanumeric': 0.13321018062397372, 'fraction_numerical': 0.0, 'mean_word_length': 1.1083946343574211, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 97, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2324353', 'n_tokens_mistral': 2849, 'n_tokens_neox': 2706, 'n_words': 376}