X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fcompress.c;h=cc3c5ca5172d9374136df169a5e14548f6a4e0a1;hp=c1a52ff63df7c04527f0d74e8c34832fd6929ed3;hb=6cc8db9fac4dcfdcd474ee49790a30a54b83c798;hpb=056bca7aee6a336b5418bf2d8ae3dd5a7ca432a2 diff --git a/src/compress.c b/src/compress.c index c1a52ff6..cc3c5ca5 100644 --- a/src/compress.c +++ b/src/compress.c @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2012 Eric Biggers + * Copyright (C) 2012, 2013 Eric Biggers * * This file is part of wimlib, a library for working with WIM files. * @@ -168,7 +168,8 @@ static void huffman_tree_compute_path_lengths(HuffmanNode *node, u16 cur_len) } } -/* Creates a canonical Huffman code from an array of symbol frequencies. +/* make_canonical_huffman_code: - Creates a canonical Huffman code from an array + * of symbol frequencies. * * The algorithm used is similar to the well-known algorithm that builds a * Huffman tree using a minheap. In that algorithm, the leaf nodes are @@ -224,7 +225,7 @@ static void huffman_tree_compute_path_lengths(HuffmanNode *node, u16 cur_len) * for symbol i. */ void make_canonical_huffman_code(unsigned num_syms, unsigned max_codeword_len, - const u32 freq_tab[], u8 lens[], + const freq_t freq_tab[], u8 lens[], u16 codewords[]) { /* We require at least 2 possible symbols in the alphabet to produce a