code: func readHeadersFromFile(f *os.File, headerSize, startHeight,
  	endHeight uint32) (*bytes.Reader, error) {
  
  	// Each header is headerSize bytes, so using this information, we'll
  	// seek a distance to cover that height based on the size the headers.
  	seekDistance := uint64(startHeight) * uint64(headerSize)
  
  	// Based on the number of headers in the range, we'll allocate a single
  	// slice that's able to hold the entire range of headers.
  	numHeaders := endHeight - startHeight + 1
  	rawHeaderBytes := make([]byte, headerSize*numHeaders)
  
  	// Now that we have our slice allocated, we'll read out the entire
  	// range of headers with a single system call.
  	_, err := f.ReadAt(rawHeaderBytes, int64(seekDistance))
  	if err != nil {
  		return nil, err
  	}
  
  	return bytes.NewReader(rawHeaderBytes), nil
  }
docs: // readHeadersFromFile reads a chunk of headers, each of size headerSize, from
  // the given file, from startHeight to endHeight.