2017 © Pedro Peláez
 

library pure-bencode

A simple and complete bencode encoder/decoder

image

pure-bencode/pure-bencode

A simple and complete bencode encoder/decoder

  • Sunday, March 16, 2014
  • by jesseschalken
  • Repository
  • 1 Watchers
  • 10 Stars
  • 100 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

pure-bencode

A simple, efficient and complete Bencode encoder/decoder for PHP., (*1)

Installation

Install the composer package., (*2)

Usage

use \PureBencode\Bencode;

// encode
$bencode = Bencode::encode($value);

// decode
$value   = Bencode::decode($bencode);
  • Bencode::encode() accepts only PHP values which can be converted to their exact original by Bencode::decode(). Those are ints, strings and arrays whose contents are also valid.
  • arrays with keys of the form 0, 1, 2...n with be encoded as lists. All others will be encoded as dictionaries with their keys in sorted order.
  • Any problems will result in a \PureBencode\Exception with an appropriate message.

That is all. Have fun Bencodeing!, (*3)

The Versions

16/03 2014

dev-master

9999999-dev

A simple and complete bencode encoder/decoder

  Sources   Download

MIT

The Development Requires

by Jesse Schalken

16/03 2014

1.1

1.1.0.0

A simple and complete bencode encoder/decoder

  Sources   Download

MIT

The Development Requires

by Jesse Schalken

15/03 2014

1.0

1.0.0.0

A simple and complete bencode encoder/decoder

  Sources   Download

MIT

The Development Requires

by Jesse Schalken