| 2973 | } |
| 2974 | |
| 2975 | static void countFrequencies(std::vector<long long> &freq, |
| 2976 | const unsigned short data[/*n*/], int n) { |
| 2977 | for (int i = 0; i < HUF_ENCSIZE; ++i) freq[i] = 0; |
| 2978 | |
| 2979 | for (int i = 0; i < n; ++i) ++freq[data[i]]; |
| 2980 | } |
| 2981 | |
| 2982 | static void writeUInt(char buf[4], unsigned int i) { |
| 2983 | unsigned char *b = (unsigned char *)buf; |