func (i Int) WriteTo(w io.Writer) (int64, error) {
	written, err := fmt.Fprintf(w, "%d", i)
	return int64(written), err
}
WriteTo writes the arg to an io.Writer.
package osc
import (
	"bytes"
	"encoding/base64"
	"encoding/binary"
	"fmt"
	"io"
	"github.com/pkg/errors"
)
type Argument interface {
	io.WriterTo
	Bytes() []byte
	Equal(Argument) bool
	ReadInt32() (int32, error)
	ReadFloat32() (float32, error)
	ReadBool() (bool, error)
	ReadString() (string, error)
	ReadBlob() ([]byte, error)
	String() string
	Typetag() byte
}
func ReadArguments(typetags, data []byte) ([]Argument, error) {
	args := []Argument{}
	if len(typetags) > 0 && typetags[0] == TypetagPrefix {
		typetags = typetags[1:]
	}
	for i, tt := range typetags {
		arg, idx, err := ReadArgument(tt, data)
		if err != nil {
			return nil, errors.Wrapf(err, "read argument %d", i)
		}
		args = append(args, arg)
		data = data[idx:]
	}
	return args, nil
}
func ReadArgument(tt byte, data []byte) (Argument, int64, error) {
	switch tt {
	case TypetagInt:
		return ReadIntFrom(data)
	case TypetagFloat:
		return ReadFloatFrom(data)
	case TypetagTrue:
		return Bool(true), 0, nil
	case TypetagFalse:
		return Bool(false), 0, nil
	case TypetagString:
		s, idx := ReadString(data)
		return String(s), idx, nil
	case TypetagBlob:
		return ReadBlobFrom(data)
	default:
		return nil, 0, errors.Wrapf(ErrInvalidTypeTag, "typetag %q", string(tt))
	}
}
type Int int32
func ReadIntFrom(data []byte) (Argument, int64, error) {
	var i Int
	if err := binary.Read(bytes.NewReader(data), byteOrder, &i); err != nil {
		return nil, 0, errors.Wrap(err, "read int argument")
	}
	return i, 4, nil
}
func (i Int) Bytes() []byte {
	return []byte{
		byte(int32(i) >> 24),
		byte(int32(i) >> 16),
		byte((int32(i) >> 8)),
		byte(i),
	}
}
func (i Int) Equal(other Argument) bool {
	if other.Typetag() != TypetagInt {
		return false
	}
	i2 := other.(Int)
	return i == i2
}
func (i Int) ReadInt32() (int32, error) { return int32(i), nil }
func (i Int) ReadFloat32() (float32, error) { return 0, ErrInvalidTypeTag }
func (i Int) ReadBool() (bool, error) { return false, ErrInvalidTypeTag }
func (i Int) ReadString() (string, error) { return "", ErrInvalidTypeTag }
func (i Int) ReadBlob() ([]byte, error) { return nil, ErrInvalidTypeTag }
func (i Int) String() string { return fmt.Sprintf("Int(%d)", i) }
func (i Int) Typetag() byte { return TypetagInt }