<commit_before>Description
-----------

cl-bencode is a Common Lisp bencode library. Bencode is the encoding
used by BitTorrent.

Features
--------

cl-bencode supports all four different types of bencode values.

* byte strings
* integers as integers
* lists as lists
* and dictionaries

It's proven capable of roundtripping several torrents found in the
wild.

Example
-------

    CL-USER> (with-open-file (stream "/tmp/t.torrent" :element-type '(unsigned-byte 8))
               (bencode:decode (flex:make-flexi-stream stream)))
    #<COM.SCHOBADOO.BENCODE:BDICTIONARY {C06E8D9}>
    CL-USER> (bencode:get-bdictionary "announce-list" *)
    (("http://tracker.thepiratebay.org/announce")
     ("udp://tracker.thepiratebay.org:80/announce"))
    T
    CL-USER> (bencode:get-bdictionary "info" **)
    #<COM.SCHOBADOO.BENCODE:BDICTIONARY {C4D3F81}>
    T
    CL-USER> (ironclad:digest-sequence :sha1 (bencode:encode *** nil))
    #(255 76 172 253 93 185 89 178 3 115 13 223 110 96 77 6 47 10 18 98)
    CL-USER> (ironclad:digest-file :sha1 "/tmp/t.torrent")
    #(255 76 172 253 93 185 89 178 3 115 13 223 110 96 77 6 47 10 18 98)
    CL-USER> 

Todo
----

* Tests
* Documentation
* Error handling<commit_msg>README matching dictionaries as hashtables<commit_after>Description
-----------

cl-bencode is a Common Lisp bencode library. Bencode is the encoding
used by BitTorrent.

Features
--------

cl-bencode supports all four different types of bencode values.

* byte strings as strings or byte vectors
* integers as integers
* lists as lists
* and dictionaries as hashtables

It's proven capable of roundtripping several torrents found in the
wild.

Example
-------

    CL-USER> (with-open-file (stream "/tmp/t.torrent" :element-type '(unsigned-byte 8))
               (bencode:decode (flex:make-flexi-stream stream)))
    #<COM.SCHOBADOO.BENCODE:BDICTIONARY {C06E8D9}>
    CL-USER> (gethash "announce-list" *)
    (("http://tracker.thepiratebay.org/announce")
     ("udp://tracker.thepiratebay.org:80/announce"))
    T
    CL-USER> (gethash "info" **)
    #<COM.SCHOBADOO.BENCODE:BDICTIONARY {C4D3F81}>
    T
    CL-USER> (ironclad:digest-sequence :sha1 (bencode:encode *** nil))
    #(255 76 172 253 93 185 89 178 3 115 13 223 110 96 77 6 47 10 18 98)
    CL-USER> (ironclad:digest-file :sha1 "/tmp/t.torrent")
    #(255 76 172 253 93 185 89 178 3 115 13 223 110 96 77 6 47 10 18 98)
    CL-USER> 

Todo
----

* Tests
* Documentation
* Error handling
{'fraction_non_alphanumeric': 0.13344182262001628, 'fraction_numerical': 0.0854353132628153, 'mean_word_length': 3.112040133779264, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6224004', 'n_tokens_mistral': 1065, 'n_tokens_neox': 843, 'n_words': 262}