$data1 = file_get_contents("/tmp/msgpack1");
$data2 = file_get_contents("/tmp/msgpack2");
$unpacker = new \MessagePackUnpacker(false);
$unpacker->feed($data1);
if($unpacker->execute()) //return TRUE
{
$unpacked = $unpacker->data();
print_r($unpacked); //here we have partial data, sometime we have Exception, sometime other errors
}
$unpacker->reset();
$unpacker = new \MessagePackUnpacker(false);
$unpacker->feed($data1 . $data2);
if($unpacker->execute()) //return TRUE as expected
{
$unpacked = $unpacker->data();
print_r($unpacked); //all is OK
}
$unpacker->reset();
In ZIP i have 1 array with 100 strings MsgPacked in ObjC and saved as 2 files to test Streaming Unpacking
files: msgpack.zip
#: php -v
PHP 7.0.13 (cli) (built: Nov 11 2016 17:35:21) ( NTS )
In ZIP i have 1 array with 100 strings MsgPacked in ObjC and saved as 2 files to test Streaming Unpacking
files: msgpack.zip