1
0
mirror of https://github.com/danog/PHPStruct.git synced 2024-11-26 19:54:38 +01:00
Go to file
2016-07-04 01:43:23 +02:00
lib/danog/RightPack First commit (master) 2016-07-04 01:43:23 +02:00
.gitignore First commit (master) 2016-07-04 01:43:23 +02:00
composer.json First commit (master) 2016-07-04 01:43:23 +02:00
example.php First commit (master) 2016-07-04 01:43:23 +02:00
LICENSE First commit (master) 2016-07-04 01:43:23 +02:00
README.md First commit (master) 2016-07-04 01:43:23 +02:00

rightpack class

Licensed under MIT.

PHP's pack() and unpack(), done the right way.

This library was created to help me develop a client for the mtproto protocol.

The format syntax is exactly the one used in python's struct (https://docs.python.org/2/library/struct.html)

For now custom byte size is not fully supported, as well as p and P formats.

Installation

Install using composer:

composer require danog/rightpack

Usage

require('vendor/autoload.php');
$rightpack = new \danog\RightPack\RightPacker();

Daniil Gentili