code: func WriteInt(w io.ByteWriter, val int64) (int, error) {
  	var inv byte
  	if val < 0 {
  		inv = 0xff
  	}
  	mag := uint64(val)
  	if inv != 0 {
  		mag = -mag
  	}
  	return writeSignMag(w, mag, inv)
  }
docs: // WriteInt val as a cmpbin Int to the ByteWriter. Returns the number of bytes
  // written. Only returns an error if the underlying ByteWriter returns an error.