| @@ 222-232 (lines=11) @@ | ||
| 219 | return $num[1]; |
|
| 220 | } |
|
| 221 | ||
| 222 | private function unpackU16() |
|
| 223 | { |
|
| 224 | $this->ensureLength(2); |
|
| 225 | ||
| 226 | $num = $this->buffer[$this->offset].$this->buffer[$this->offset + 1]; |
|
| 227 | $this->offset += 2; |
|
| 228 | ||
| 229 | $num = unpack('n', $num); |
|
| 230 | ||
| 231 | return $num[1]; |
|
| 232 | } |
|
| 233 | ||
| 234 | private function unpackU32() |
|
| 235 | { |
|
| @@ 277-287 (lines=11) @@ | ||
| 274 | return $num[1]; |
|
| 275 | } |
|
| 276 | ||
| 277 | private function unpackI16() |
|
| 278 | { |
|
| 279 | $this->ensureLength(2); |
|
| 280 | ||
| 281 | $num = $this->buffer[$this->offset].$this->buffer[$this->offset + 1]; |
|
| 282 | $this->offset += 2; |
|
| 283 | ||
| 284 | $num = unpack('s', strrev($num)); |
|
| 285 | ||
| 286 | return $num[1]; |
|
| 287 | } |
|
| 288 | ||
| 289 | private function unpackI32() |
|
| 290 | { |
|