今天下午用C++搞了個將torrent文件解析成xml文件格式的程序,有幾個問題還沒有解決,先記著打游戲去了.
(1)torrent文件的二進(jìn)制校驗(yàn)碼
(2)有非法字符的node
(3)XSL 還沒寫
/Files/merlinfang/btparser.rar
附錄:
BT種子文件使用了一種叫bencoding的編碼方法來保存數(shù)據(jù)。
bencoding現(xiàn)有四種類型的數(shù)據(jù):srings(字符串),integers(整數(shù)),lists(列表),dictionaries(字典)
編碼規(guī)則如下:
strings(字符串)編碼為:<字符串長度>:<字符串>
integers(整數(shù))編碼為:i<整數(shù)>e
lists(列表)編碼為:l<bencoding編碼類型>e
dictionaries(字典)編碼為d<bencoding字符串><bencoding編碼類型>e
posted on 2008-05-01 18:12
merlinfang 閱讀(3534)
評論(5) 編輯 收藏 引用