arokettu / bencode
BitTorrent的Bencode编码/解码器
4.2.1
2024-07-28 12:54 UTC
Requires
- php: ^8.1
- arokettu/is-resource: ^1.0
Requires (Dev)
- ext-gmp: *
- ext-json: *
- brick/math: *
- mikey179/vfsstream: ^1.6.11
- pear/math_biginteger: ^1.0
- phpunit/phpunit: ^10.5.28
- psy/psysh: *
- sandfox.dev/code-standard: ^1.2024.07.05
- squizlabs/php_codesniffer: *
- vimeo/psalm: ^5.2
Suggests
- php-64bit: Running 64 bit is recommended to prevent integer overflow
- ext-gmp: In case you need integers larger than your architecture supports
- brick/math: In case you need integers larger than your architecture supports
- pear/math_biginteger: In case you need integers larger than your architecture supports
- dev-master
- 4.2.1
- 4.2.0
- 4.1.0
- 4.0.0
- 3.x-dev
- 3.1.1
- 3.1.0
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 3.0.0-alpha1
- 2.x-dev
- 2.8.1
- 2.8.0
- 2.7.4
- 2.7.3
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.1
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.x-dev
- 1.8.1
- 1.8.0
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2024-08-28 13:09:43 UTC
README
Bencode是点对点文件共享系统BitTorrent用于存储和传输非结构化数据的编码。
这是一个纯PHP库,允许您编码和解码Bencode数据。
安装
composer require 'arokettu/bencode'
支持版本
- 4.x (当前,PHP 8.1+)
简单使用
<?php \Arokettu\Bencode\Bencode::encode(['info' => ['length' => 12345, 'name' => 'Bencoded demo']]); \Arokettu\Bencode\Bencode::decode('d4:infod6:lengthi12345e4:name13:Bencoded demoee');
文档
完整文档请参阅此处:https://sandfox.dev/php/bencode.html
所有支持版本的文档可以在Read the Docs上找到
- 1.x: https://bencode.readthedocs.io/en/1.x/
- 2.x: https://bencode.readthedocs.io/en/2.x/
- 3.x: https://bencode.readthedocs.io/en/3.x/
- 4.x: https://bencode.readthedocs.io/
支持
请在GitLab的我们的主要仓库中提交问题: https://gitlab.com/sandfox/bencode/-/issues
在Gitter的我们的房间中随意提问:https://gitter.im/arokettu/community
许可
该库在MIT许可证的条款下作为开源软件提供。