Add class implementing MessagePack serialization
authorOri Livneh <ori@wikimedia.org>
Fri, 3 Jan 2014 01:07:10 +0000 (17:07 -0800)
committerOri Livneh <ori@wikimedia.org>
Fri, 3 Jan 2014 02:04:24 +0000 (18:04 -0800)
commit681607e55b44860cf5dc985128daca8b7bda8ae0
tree0eceff275a2b7565affb06e391edac2ac14ba66e
parentf7e51094c30235e3548e77a8196f4085362b84c1
Add class implementing MessagePack serialization

MessagePack is a space-efficient binary data interchange format. I am going to
use it to encode profiling data in ProfilerSimpleUDP. The official PHP
implementation is provided as a C extension, so using it would further
encumber migration to HHVM. This patch adds MWMessagePack, a class implementing
a pack() method for encoding native PHP values as MessagePack byte strings. The
implementation is based on <https://github.com/onlinecity/msgpack-php>, but
revised for clarity and conformity with MediaWiki coding conventions.

Change-Id: Id2833c5a9da659cb13ec1330de9dd57138ada9c8
includes/AutoLoader.php
includes/libs/MWMessagePack.php [new file with mode: 0644]
tests/phpunit/includes/libs/MWMessagePackTest.php [new file with mode: 0644]