1 | <?php |
||
7 | abstract class PackUtils |
||
8 | { |
||
9 | private static $offsets = [ |
||
10 | // MP_UINT |
||
11 | 0xcd => 2, |
||
12 | 0xce => 4, |
||
13 | 0xcf => 8, |
||
14 | |||
15 | // MP_INT |
||
16 | 0xd1 => 2, |
||
17 | 0xd2 => 4, |
||
18 | 0xd3 => 8, |
||
19 | ]; |
||
20 | |||
21 | 110 | public static function packLength($length) |
|
25 | |||
26 | 102 | public static function unpackLength($data) |
|
34 | |||
35 | 6 | public static function getHeaderSize($buffer) |
|
52 | |||
53 | 6 | private static function isMap($c) |
|
57 | } |
||
58 |