[問題] Shannon-fano-elias decode 解碼問題

作者: puppyulove (WHY)   2016-06-05 13:46:24
請問一下 解碼程式要怎麼寫呢?
目前是把111.text(source)的資料用shanono-fano-elias編碼
成二進制資料並生成encode.txt檔案
接下來要從這encode.txt裡面的資料解碼回來
請問要如何解碼呢(decode.txt)?
程式碼
http://ideone.com/dUPSuZ
感激!
111.TXT裡面的資料是 1 2 1 2 2 2 3 4

Links booklink

Contact Us: admin [ a t ] ucptt.com