code: func (s *ObjectStorage) EncodedObjectSize(h plumbing.Hash) (
  	size int64, err error) {
  	size, err = s.encodedObjectSizeFromUnpacked(h)
  	if err != nil && err != plumbing.ErrObjectNotFound {
  		return 0, err
  	} else if err == nil {
  		return size, nil
  	}
  
  	return s.encodedObjectSizeFromPackfile(h)
  }
docs: // EncodedObjectSize returns the plaintext size of the given object,
  // without actually reading the full object data from storage.