code: func CheckFooter(in ChecksumIndexInput) (cs int64, err error) {
  	if err = validateFooter(in); err == nil {
  		cs = in.Checksum()
  		var cs2 int64
  		if cs2, err = in.ReadLong(); err == nil {
  			if cs != cs2 {
  				return 0, errors.New(fmt.Sprintf(
  					"checksum failed (hardware problem?): expected=%v actual=%v (resource=%v)",
  					util.ItoHex(cs2), util.ItoHex(cs), in))
  			}
  			if in.FilePointer() != in.Length() {
  				return 0, errors.New(fmt.Sprintf(
  					"did not read all bytes from file: read %v vs size %v (resource: %v)",
  					in.FilePointer(), in.Length(), in))
  			}
  		}
  	}
  	return
  }
docs: /* Validates the codec footer previously written by WriteFooter(). */