From 0b82929e10971b71fcfb9105a2354da17c8f692a Mon Sep 17 00:00:00 2001 From: Caball009 <82909616+Caball009@users.noreply.github.com> Date: Fri, 11 Feb 2022 00:09:46 +0100 Subject: [PATCH] Update huffman.c Unused integer array? --- src/huffman.c | 265 +------------------------------------------------- 1 file changed, 2 insertions(+), 263 deletions(-) diff --git a/src/huffman.c b/src/huffman.c index cec8f1c..e1a784b 100644 --- a/src/huffman.c +++ b/src/huffman.c @@ -114,267 +114,6 @@ static void Huff_Init( huff_t *huff ) { } - -int msg_hData[256] = { - 274054, //0 - 68777, //1 - 40460, //2 - 40266, //3 - 48059, //4 - 39006, //5 - 48630, //6 - 27692, //7 - 17712, //8 - 15439, //9 - 12386, //10 - 10758, //11 - 9420, //12 - 9979, //13 - 9346, //14 - 15256, //15 - 13184, //16 - 14319, //17 - 7750, //18 - 7221, //19 - 6095, //20 - 5666, //21 - 12606, //22 - 7263, //23 - 7322, //24 - 5807, //25 - 11628, //26 - 6199, //27 - 7826, //28 - 6349, //29 - 7698, //30 - 9656, //31 - 28968, //32 - 5164, //33 - 13629, //34 - 6058, //35 - 4745, //36 - 4519, //37 - 5199, //38 - 4807, //39 - 5323, //40 - 3433, //41 - 3455, //42 - 3563, //43 - 6979, //44 - 5229, //45 - 5002, //46 - 4423, //47 - 14108, //48 - 13631, //49 - 11908, //50 - 11801, //51 - 10261, //52 - 7635, //53 - 7215, //54 - 7218, //55 - 9353, //56 - 6161, //57 - 5689, //58 - 4649, //59 - 5026, //60 - 5866, //61 - 8002, //62 - 10534, //63 - 15381, //64 - 8874, //65 - 11798, //66 - 7199, //67 - 12814, //68 - 6103, //69 - 4982, //70 - 5972, //71 - 6779, //72 - 4929, //73 - 5333, //74 - 3503, //75 - 4345, //76 - 6098, //77 - 14117, //78 - 16440, //79 - 6446, //80 - 3062, //81 - 4695, //82 - 3085, //83 - 4198, //84 - 4013, //85 - 3878, //86 - 3414, //87 - 5514, //88 - 4092, //89 - 3261, //90 - 4740, //91 - 4544, //92 - 3127, //93 - 3385, //94 - 7688, //95 - 11126, //96 - 6417, //97 - 5297, //98 - 4529, //99 - 6333, //100 - 4210, //101 - 7056, //102 - 4658, //103 - 6190, //104 - 3512, //105 - 2843, //106 - 3479, //107 - 9369, //108 - 5203, //109 - 4980, //110 - 5881, //111 - 7509, //112 - 4292, //113 - 6097, //114 - 5492, //115 - 4648, //116 - 2996, //117 - 4988, //118 - 4163, //119 - 6534, //120 - 4001, //121 - 4342, //122 - 4488, //123 - 6039, //124 - 4827, //125 - 7112, //126 - 8654, //127 - 26712, //128 - 8688, //129 - 9677, //130 - 9368, //131 - 7209, //132 - 3399, //133 - 4473, //134 - 4677, //135 - 11087, //136 - 4094, //137 - 3404, //138 - 4176, //139 - 6733, //140 - 3702, //141 - 11420, //142 - 4867, //143 - 5968, //144 - 3475, //145 - 3722, //146 - 3560, //147 - 4571, //148 - 2720, //149 - 3189, //150 - 3099, //151 - 4595, //152 - 4044, //153 - 4402, //154 - 3889, //155 - 4989, //156 - 3186, //157 - 3153, //158 - 5387, //159 - 8020, //160 - 3322, //161 - 3775, //162 - 2886, //163 - 4191, //164 - 2879, //165 - 3110, //166 - 2576, //167 - 3693, //168 - 2436, //169 - 4935, //170 - 3017, //171 - 3538, //172 - 5688, //173 - 3444, //174 - 3410, //175 - 9170, //176 - 4708, //177 - 3425, //178 - 3273, //179 - 3684, //180 - 4564, //181 - 6957, //182 - 4817, //183 - 5224, //184 - 3285, //185 - 3143, //186 - 4227, //187 - 5630, //188 - 6053, //189 - 5851, //190 - 6507, //191 - 13692, //192 - 8270, //193 - 8260, //194 - 5583, //195 - 7568, //196 - 4082, //197 - 3984, //198 - 4574, //199 - 6440, //200 - 3533, //201 - 2992, //202 - 2708, //203 - 5190, //204 - 3889, //205 - 3799, //206 - 4582, //207 - 6020, //208 - 3464, //209 - 4431, //210 - 3495, //211 - 2906, //212 - 2243, //213 - 3856, //214 - 3321, //215 - 8759, //216 - 3928, //217 - 2905, //218 - 3875, //219 - 4382, //220 - 3885, //221 - 5869, //222 - 6235, //223 - 10685, //224 - 4433, //225 - 4639, //226 - 4305, //227 - 4683, //228 - 2849, //229 - 3379, //230 - 4683, //231 - 5477, //232 - 4127, //233 - 3853, //234 - 3515, //235 - 4913, //236 - 3601, //237 - 5237, //238 - 6617, //239 - 9019, //240 - 4857, //241 - 4112, //242 - 5180, //243 - 5998, //244 - 4925, //245 - 4986, //246 - 6365, //247 - 7930, //248 - 5948, //249 - 8085, //250 - 7732, //251 - 8643, //252 - 8901, //253 - 9653, //254 - 32647, //255 - -}; - static huff_t msgHuff; int MSG_ReadBitsCompress(const byte* input, int readsize, byte* outputBuf, int outputBufSize){ @@ -414,7 +153,7 @@ int MSG_WriteBitsCompress( char dummy, const byte *datasrc, byte *buffdest, int } -static void Huff_BuildFromData(huff_t* huff, const int* msg_hData) +static void Huff_BuildFromData(huff_t* huff) { huff->blocNode = 513; huff->nodeList[511].parent = &huff->nodeList[512]; @@ -2740,5 +2479,5 @@ void Huffman_InitMain() { huffInit = qtrue; Huff_Init(&msgHuff); - Huff_BuildFromData(&msgHuff, msg_hData); + Huff_BuildFromData(&msgHuff); }