https://github.com/caolan/chicken-bencode
Bencoding parser and serializer for CHICKEN scheme
https://github.com/caolan/chicken-bencode
Last synced: 5 months ago
JSON representation
Bencoding parser and serializer for CHICKEN scheme
- Host: GitHub
- URL: https://github.com/caolan/chicken-bencode
- Owner: caolan
- Created: 2015-11-06T16:19:09.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-01-25T11:52:24.000Z (over 5 years ago)
- Last Synced: 2025-04-07T14:15:44.079Z (about 1 year ago)
- Language: Scheme
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
Awesome Lists containing this project
README
# Bencode
A Bencoding parser and serializer for [CHICKEN scheme](http://call-cc.org).
Usage:
```scheme
;; defaults to current-port if no port provided
(read-bencode [port])
(write-bencode data [port])
```
Conversion to/from scheme types:
```
Bencode | Scheme
----------------------------------------
string | string
integer | number
list | vector
dictionary | alist in (symbol . *) form
```
Attempting to bencode a scheme type not on the above list,
or attempting to encode a non-integer number will cause
an exception. Condition objects arising from encode/decode
errors will have the type `(exn bencode)`.