bogdasar1985 / bitziplib

A library for working with Huffman Code
GNU Lesser General Public License v2.1
6 stars 0 forks source link

BIG IMPORTANT BUG! #13

Closed bogdasar1985 closed 3 years ago

bogdasar1985 commented 3 years ago

BUILDING WRONG TREE IN DECODER! build_tree use huffman implementation of priority_queue with specific policy of sorting, it should use normal policy.

bogdasar1985 commented 3 years ago

It happens because of instead hf_priority_queue extract elements looking for count and then symbol, all elements without symbol have got SAME PSEUDO SYMBOL -1.

bogdasar1985 commented 3 years ago

Fix https://github.com/bogdasar1985/HuffmanCodeLib/commit/e597ef59809f0a04616bd86ee7f1c5b311ab3756