1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
Metadata-Version: 2.4
Name: fastbencode
Version: 0.3.10
Summary: Implementation of bencode with optional fast Rust extensions
Maintainer-email: Breezy Developers <breezy-core@googlegroups.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/breezy-team/fastbencode
Project-URL: GitHub, https://github.com/breezy-team/fastbencode
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: COPYING
Provides-Extra: rust
Requires-Dist: setuptools-rust>=1.0.0; extra == "rust"
Provides-Extra: dev
Requires-Dist: ruff==0.15.6; extra == "dev"
Dynamic: license-file
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 Rust extension
based on PyO3. Both provide the same functionality, but the Rust 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}]
The default ``bencode``/``bdecode`` functions just operate on
bytestrings. Use ``bencode_utf8`` / ``bdecode_utf8`` to
serialize/deserialize all plain strings as UTF-8 bytestrings.
Note that for performance reasons, all dictionary keys still have to be
bytestrings.
License
=======
fastbencode is available under the Apache License, version 2.
Copyright
=========
* Original Pure-Python bencoder © Petru Paler
* Split out from Bazaar/Breezy by Jelmer Vernooij
* Rust extension © Jelmer Vernooij
|