PHPackages                             theonedt/bencode - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. theonedt/bencode

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

theonedt/bencode
================

A pure and simple PHP library for encoding and decoding Bencode data

00

Since Mar 9Compare

[ Source](https://github.com/theOneDT/Bencode)[ Packagist](https://packagist.org/packages/theonedt/bencode)[ RSS](/packages/theonedt-bencode/feed)WikiDiscussions Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP Bencode Library
===================

[](#php-bencode-library)

[![Codacy Badge](https://camo.githubusercontent.com/90b96ebeba011836de631805ea54cb74b9da0c7526d3b2a7c695dbc2a213209a/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3134626239353235613561333433303739653435643935303164616331623463)](https://app.codacy.com/manual/rhilipruan/Bencode?utm_source=github.com&utm_medium=referral&utm_content=Rhilip/Bencode&utm_campaign=Badge_Grade_Dashboard)[![FOSSA Status](https://camo.githubusercontent.com/8f9199f3da14a7ec2c1fccbccbc3aaf024308f4c047e9d44ef7a58d1e9c46740/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532465268696c697025324642656e636f64652e7376673f747970653d736869656c64)](https://app.fossa.io/projects/git%2Bgithub.com%2FRhilip%2FBencode?ref=badge_shield)

[Bencode](https://en.wikipedia.org/wiki/Bencode) is the encoding used by the peer-to-peer file sharing system [BitTorrent](https://opensource.org/licenses/MIT) for storing and transmitting loosely structured data.

This is a pure PHP library that allows you to encode and decode Bencode data.

This library is fork from \[OPSnet/bencode-torrent\] / \[Rhilip/Bencode\] (), with same method like [sandfoxme/bencode](https://github.com/sandfoxme/bencode)

Installation
------------

[](#installation)

```
composer require theonedt/bencode
```

Usage
-----

[](#usage)

```
