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