code: func (p *Parser) Parse() (plumbing.Hash, error) {
  	if err := p.init(); err != nil {
  		return plumbing.ZeroHash, err
  	}
  
  	if err := p.indexObjects(); err != nil {
  		return plumbing.ZeroHash, err
  	}
  
  	var err error
  	p.checksum, err = p.scanner.Checksum()
  	if err != nil && err != io.EOF {
  		return plumbing.ZeroHash, err
  	}
  
  	if err := p.resolveDeltas(); err != nil {
  		return plumbing.ZeroHash, err
  	}
  
  	if err := p.onFooter(p.checksum); err != nil {
  		return plumbing.ZeroHash, err
  	}
  
  	return p.checksum, nil
  }
docs: // Parse start decoding phase of the packfile.