code: func (h *DBHeader) readFrom(r io.Reader) error {
  	// Save read data into a buffer that will be the RawData
  	buffer := bytes.NewBuffer([]byte{})
  	tR := io.TeeReader(r, buffer)
  
  	// Read signature
  	h.Signature = new(Signature)
  	if err := binary.Read(tR, binary.LittleEndian, h.Signature); err != nil {
  		return err
  	}
  
  	// Read file headers
  	h.FileHeaders = new(FileHeaders)
  	for {
  		var err error
  		if h.IsKdbx4() {
  			err = h.FileHeaders.readHeader4(tR)
  		} else {
  			err = h.FileHeaders.readHeader31(tR)
  		}
  
  		// Update RawData buffer
  		h.RawData = buffer.Bytes()
  
  		if err != nil {
  			if err == ErrEndOfHeaders {
  				break
  			}
  			return err
  		}
  	}
  	return nil
  }
docs: // readFrom reads the header from an io.Reader