code: func (cdb *Writer) Put(key, value []byte) error {
  	entrySize := int64(8 + len(key) + len(value))
  	if (cdb.bufferedOffset + entrySize + cdb.estimatedFooterSize + 16) > math.MaxUint32 {
  		return ErrTooMuchData
  	}
  
  	// Record the entry in the hash table, to be written out at the end.
  	hash := cdb.hash(key)
  	table := hash & 0xff
  
  	entry := entry{hash: hash, offset: uint32(cdb.bufferedOffset)}
  	cdb.entries[table] = append(cdb.entries[table], entry)
  
  	// Write the key length, then value length, then key, then value.
  	err := writeTuple(cdb.bufferedWriter, uint32(len(key)), uint32(len(value)))
  	if err != nil {
  		return err
  	}
  
  	_, err = cdb.bufferedWriter.Write(key)
  	if err != nil {
  		return err
  	}
  
  	_, err = cdb.bufferedWriter.Write(value)
  	if err != nil {
  		return err
  	}
  
  	cdb.bufferedOffset += entrySize
  	cdb.estimatedFooterSize += 16
  	return nil
  }
docs: // Put adds a key/value pair to the database. If the amount of data written
  // would exceed the limit, Put returns ErrTooMuchData.