code: func (e *Encoder) Encode(
  	hashes []plumbing.Hash,
  	packWindow uint,
  ) (plumbing.Hash, error) {
  	objects, err := e.selector.ObjectsToPack(hashes, packWindow)
  	if err != nil {
  		return plumbing.ZeroHash, err
  	}
  
  	return e.encode(objects)
  }
docs: // Encode creates a packfile containing all the objects referenced in
  // hashes and writes it to the writer in the Encoder.  `packWindow`
  // specifies the size of the sliding window used to compare objects
  // for delta compression; 0 turns off delta compression entirely.