<commit_before>﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Dbus
{
    public static class Decoder
    {
        private static readonly Dictionary<string, ElementDecoder<object>> typeDecoders = new Dictionary<string, ElementDecoder<object>> {
            { "o", GetObjectPath},
            { "s", GetString },
            { "g", GetSignature },
            { "y", box(GetByte) },
            { "b", box(GetBoolean) },
            { "i", box(GetInt32) },
            { "u", box(GetUInt32) },
        };

        private static ElementDecoder<object> box<T>(ElementDecoder<T> orig)
        {
            return (byte[] buffer, ref int index) => orig(buffer, ref index);<commit_msg>Use an index initializer instead of dictionary initializer<commit_after>﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Dbus
{
    public static class Decoder
    {
        private static readonly Dictionary<string, ElementDecoder<object>> typeDecoders = new Dictionary<string, ElementDecoder<object>>
        {
            ["o"] = GetObjectPath,
            ["s"] = GetString,
            ["g"] = GetSignature,
            ["y"] = box(GetByte),
            ["b"] = box(GetBoolean),
            ["i"] = box(GetInt32),
            ["u"] = box(GetUInt32),
        };

        private static ElementDecoder<object> box<T>(ElementDecoder<T> orig)
        {
            return (byte[] buffer, ref int index) => orig(buffer, ref index);
{'fraction_non_alphanumeric': 0.13016949152542373, 'fraction_numerical': 0.005423728813559322, 'mean_word_length': 2.4485981308411215, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, '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': '3582148', 'n_tokens_mistral': 408, 'n_tokens_neox': 401, 'n_words': 104}