diff --git a/src/VarInt.php b/src/VarInt.php index 1724988..fd86f69 100644 --- a/src/VarInt.php +++ b/src/VarInt.php @@ -23,6 +23,11 @@ public static function readUint(string $hex, int $offset = 0): array { return [0, 0]; } + public static function readBool(string $hex, int $offset = 0): array { + [$flag, $next_offset] = static::readUint($hex, $offset); + return [!!$flag, $next_offset]; + } + public static function packUint(int $value): string { $h = ''; $i = 0;