code: func NewWriter(writer io.WriteSeeker, hash func([]byte) uint32) (*Writer, error) {
  	// Leave 256 * 8 bytes for the index at the head of the file.
  	_, err := writer.Seek(0, os.SEEK_SET)
  	if err != nil {
  		return nil, err
  	}
  
  	_, err = writer.Write(make([]byte, indexSize))
  	if err != nil {
  		return nil, err
  	}
  
  	if hash == nil {
  		hash = cdbHash
  	}
  
  	return &Writer{
  		hash:           hash,
  		writer:         writer,
  		bufferedWriter: bufio.NewWriterSize(writer, 65536),
  		bufferedOffset: indexSize,
  	}, nil
  }
docs: // NewWriter opens a CDB database for the given io.WriteSeeker.
  //
  // If hash is nil, it will default to the CDB hash function.