X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=libcds%2Fsrc%2Fcoders%2Fhuffman_codes.cpp;h=d11458d1ee6627505eeb2875fc60cda1300400f6;hb=f32808a35be7a1e62830a5972473178014fa44e5;hp=8bffa69a97e2291aa9e7e966024660eba6e30c3e;hpb=a9846746dc7a55764591fcc273fd48c6049df962;p=SXSI%2FXMLTree.git diff --git a/libcds/src/coders/huffman_codes.cpp b/libcds/src/coders/huffman_codes.cpp index 8bffa69..d11458d 100644 --- a/libcds/src/coders/huffman_codes.cpp +++ b/libcds/src/coders/huffman_codes.cpp @@ -20,6 +20,7 @@ */ #include +using std::max; huffman_codes::huffman_codes(uint * symb, uint n) { uint max_v = 0; @@ -34,6 +35,19 @@ huffman_codes::huffman_codes(uint * symb, uint n) { delete [] occ; } +huffman_codes::huffman_codes(uchar * symb, uint n) { + uchar max_v = 0; + for(uint i=0;i