Skip to main content

Implementation of bencode with optional fast C extensions

Project description

fastbencode

fastbencode is an implementation of the bencode serialization format originally used by BitTorrent.

The package includes both a pure-Python version and an optional C extension based on Cython. Both provide the same functionality, but the C extension provides significantly better performance.

Example:

>>> from fastbencode import bencode, bdecode
>>> bencode([1, 2, b'a', {b'd': 3}])
b'li1ei2e1:ad1:di3eee'
>>> bdecode(bencode([1, 2, b'a', {b'd': 3}]))
[1, 2, b'a', {b'd': 3}]

License

fastbencode is available under the GNU GPL, version 2 or later.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastbencode-0.0.12.tar.gz (84.3 kB view details)

Uploaded Source

File details

Details for the file fastbencode-0.0.12.tar.gz.

File metadata

  • Download URL: fastbencode-0.0.12.tar.gz
  • Upload date:
  • Size: 84.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for fastbencode-0.0.12.tar.gz
Algorithm Hash digest
SHA256 c3b17eef44755a2ce8fe2d06182735dc00dfe89a8046d3d7312ebfa9398f2846
MD5 a8ba14b5376bc6d3e6d4b555a4689739
BLAKE2b-256 46e2ad338db5877d9e7bee4c0a549337ee12ce95f1fb43eb435b4ffb9e89fc76

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page