Aerys\HPack::decode_dynamic_integer PHP Method

decode_dynamic_integer() private static method

private static decode_dynamic_integer ( &$input, &$off )
    private static function decode_dynamic_integer(&$input, &$off)
    {
        $c = \ord($input[$off++]);
        $int = $c & 0x7f;
        $i = 0;
        while ($c & 0x80) {
            if (!isset($input[$off])) {
                return -0x80;
            }
            $c = \ord($input[$off++]);
            $int += ($c & 0x7f) << ++$i * 7;
        }
        return $int;
    }