code: func WriteFooter(out IndexOutput) (err error) {
  	if err = out.WriteInt(FOOTER_MAGIC); err == nil {
  		if err = out.WriteInt(0); err == nil {
  			err = out.WriteLong(out.Checksum())
  		}
  	}
  	return
  }
docs: /*
  Writes a codec footer, which records both a checksum algorithm ID and
  a checksum. This footer can be parsed and validated with CheckFooter().
  
  CodecFooter --> Magic,AlgorithmID,Checksum
  	- Magic --> uint32. This identifies the start of the footer. It is
  		always FOOTER_MAGIC.
  	- AlgorithmID --> uing32. This indicates the checksum algorithm
  		used. Currently this is always 0, for zlib-crc32.
  	- Checksum --> uint64. The actual checksum value for all previous
  		bytes in the stream, including the bytes from Magic and AlgorithmID.
  */