<commit_before># [Msgpack](http://msgpack.org/) implementation for Modern PHP

## What is Msgpack?

If you ever wished to use JSON for convenience (storing an image with metadata)
but could not for technical reasons (encoding, size, speed...), MessagePack is a perfect replacement.

MessagePack is an efficient binary serialization format.
It lets you exchange data among multiple languages like JSON.
But it's faster and smaller.
Small integers are encoded into a single byte,
and typical short strings require only one extra byte in addition to the strings themselves.

For more information on Msgpack: [msgpack.org](http://msgpack.org/)

## Usage

There are 2 main classes with basic static methods to use:

```php
    $encoder = new Msgpack\Encoder;
    $string = $encoder->encode($data);

    $decoder = new Msgpack\Decoder;<commit_msg>Added some badges<commit_after># [Msgpack](http://msgpack.org/) implementation for Modern PHP
[![Build Status](http://img.shields.io/travis/hannesvdvreken/msgpack.svg?style=flat-square)](https://travis-ci.org/hannesvdvreken/msgpack)
[![License](http://img.shields.io/packagist/l/hannesvdvreken/msgpack.svg?style=flat-square)](#license)

## What is Msgpack?

If you ever wished to use JSON for convenience (storing an image with metadata)
but could not for technical reasons (encoding, size, speed...), MessagePack is a perfect replacement.

MessagePack is an efficient binary serialization format.
It lets you exchange data among multiple languages like JSON.
But it's faster and smaller.
Small integers are encoded into a single byte,
and typical short strings require only one extra byte in addition to the strings themselves.

For more information on Msgpack: [msgpack.org](http://msgpack.org/)

## Usage

There are 2 main classes with basic static methods to use:

```php
    $encoder = new Msgpack\Encoder;
    $string = $encoder->encode($data);

    $decoder = new Msgpack\Decoder;
{'fraction_non_alphanumeric': 0.09595435684647304, 'fraction_numerical': 0.001037344398340249, 'mean_word_length': 4.724035608308605, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2669054', 'n_tokens_mistral': 549, 'n_tokens_neox': 527, 'n_words': 222}