項(xiàng)目地址:python-huffman (github)
2017.3.27
目前完成了 huffman tree的生成秆剪,并驗(yàn)證了一下Huffman tree生成的正確性喝滞。調(diào)試了一個(gè)晚上才用遞歸(遞歸的時(shí)候要先確定函數(shù)的輸出形式、之后根據(jù)子問(wèn)題的輸出格式铆遭,確定合并子問(wèn)題輸出的方法)的方法遍歷輸出了所有葉結(jié)點(diǎn)和它們對(duì)應(yīng)的編碼锐极。下一部根據(jù)huffman編碼的規(guī)則膘螟,調(diào)整一下細(xì)節(jié)(并與matlab的結(jié)果做對(duì)比)成福。然后再做下一步考慮
update
- 輸出為字典形式
2017.06.20
this project has been working for the moment, related document will be added soon.