code: func (s *Scanner) nextObjectHeader() (*ObjectHeader, error) {
  	s.r.Flush()
  	s.crc.Reset()
  
  	h := &ObjectHeader{}
  	s.pendingObject = h
  
  	var err error
  	h.Offset, err = s.r.Seek(0, io.SeekCurrent)
  	if err != nil {
  		return nil, err
  	}
  
  	h.Type, h.Length, err = s.readObjectTypeAndLength()
  	if err != nil {
  		return nil, err
  	}
  
  	switch h.Type {
  	case plumbing.OFSDeltaObject:
  		no, err := binary.ReadVariableWidthInt(s.r)
  		if err != nil {
  			return nil, err
  		}
  
  		h.OffsetReference = h.Offset - no
  	case plumbing.REFDeltaObject:
  		var err error
  		h.Reference, err = binary.ReadHash(s.r)
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	return h, nil
  }
docs: // nextObjectHeader returns the ObjectHeader for the next object in the reader
  // without the Offset field