integers.go
func (b *TupleBuilder) PutInt8(field string, value int8) (wrote uint64, err error) {

	// field type should be
	if err = b.typeCheck(field, Int8Field); err != nil {
		return 0, err
	}

	// minimum bytes is 2 (type code + value)
	if b.available() < 2 {
		return 0, xbinary.ErrOutOfRange
	}

	// write type code
	b.buffer[b.pos] = byte(Int8Code.OpCode)

	// write value
	b.buffer[b.pos+1] = byte(value)

	// set field offset
	b.offsets[field] = b.pos

	// incr pos
	b.pos += 2

	return 2, nil
}
func (b *TupleBuilder) PutInt8(field string, value int8) (wrote uint64, err error) {

	// field type should be
	if err = b.typeCheck(field, Int8Field); err != nil {
		return 0, err
	}

	// minimum bytes is 2 (type code + value)
	if b.available() < 2 {
		return 0, xbinary.ErrOutOfRange
	}

	// write type code
	b.buffer[b.pos] = byte(Int8Code.OpCode)

	// write value
	b.buffer[b.pos+1] = byte(value)

	// set field offset
	b.offsets[field] = b.pos

	// incr pos
	b.pos += 2

	return 2, nil
}
// PutInt8 sets an 8-bit signed value for the given string name. The field name must be an Int8Field otherwise an error will be returned. If the type buffer no longer has enough space to write this value, an xbinary.ErrOutOfRange error will be returned. Upon success, 2 bytes should be written into the buffer and the returned error should be nil. The type code is written first then the byte value.