Gittern\Transport\Packfile::patchDeltaHeaderSize PHP Méthode

patchDeltaHeaderSize() protected méthode

See also: https://github.com/mojombo/grit/blob/master/lib/grit/git-ruby/internal/pack.rb
protected patchDeltaHeaderSize ( $delta, $pos )
    protected function patchDeltaHeaderSize($delta, $pos)
    {
        $size = 0;
        $shift = 0;
        do {
            $c = ord($delta[$pos]);
            if (!$c) {
                throw new InvalidPackfileException("Packfile delta header is invalid");
            }
            $pos++;
            $size |= ($c & 0x7f) << $shift;
            $shift += 7;
        } while ($c & 0x80);
        return array($size, $pos);
    }