code: func (p *Packfile) GetSizeByOffset(o int64) (size int64, err error) {
  	if _, err := p.s.SeekFromStart(o); err != nil {
  		if err == io.EOF || isInvalid(err) {
  			return 0, plumbing.ErrObjectNotFound
  		}
  
  		return 0, err
  	}
  
  	h, err := p.nextObjectHeader()
  	if err != nil {
  		return 0, err
  	}
  	return p.getObjectSize(h)
  }
docs: // GetSizeByOffset retrieves the size of the encoded object from the
  // packfile with the given offset.