package bin

import (
	
	
)

// PutID serializes type definition id, like a8509bda.
func ( *Buffer) ( uint32) {
	.PutUint32()
}

// Put appends raw bytes to buffer.
//
// Buffer does not retain raw.
func ( *Buffer) ( []byte) {
	.Buf = append(.Buf, ...)
}

// PutString serializes bare string.
func ( *Buffer) ( string) {
	.Buf = encodeString(.Buf, )
}

// PutBytes serializes bare byte string.
func ( *Buffer) ( []byte) {
	.Buf = encodeBytes(.Buf, )
}

// PutVectorHeader serializes vector header with provided length.
func ( *Buffer) ( int) {
	.PutID(TypeVector)
	.PutInt32(int32())
}

// PutInt serializes v as signed 32-bit integer.
//
// If v is bigger than 32-bit, `behavior` is undefined.
func ( *Buffer) ( int) {
	.PutInt32(int32())
}

// PutBool serializes bare boolean.
func ( *Buffer) ( bool) {
	switch  {
	case true:
		.PutID(TypeTrue)
	case false:
		.PutID(TypeFalse)
	}
}

// PutUint16 serializes unsigned 16-bit integer.
func ( *Buffer) ( uint16) {
	 := make([]byte, 2)
	binary.LittleEndian.PutUint16(, )
	.Buf = append(.Buf, ...)
}

// PutInt32 serializes signed 32-bit integer.
func ( *Buffer) ( int32) {
	.PutUint32(uint32())
}

// PutUint32 serializes unsigned 32-bit integer.
func ( *Buffer) ( uint32) {
	 := make([]byte, Word)
	binary.LittleEndian.PutUint32(, )
	.Buf = append(.Buf, ...)
}

// PutInt53 serializes v as signed integer.
func ( *Buffer) ( int64) {
	.PutLong()
}

// PutLong serializes v as signed integer.
func ( *Buffer) ( int64) {
	.PutUint64(uint64())
}

// PutUint64 serializes v as unsigned 64-bit integer.
func ( *Buffer) ( uint64) {
	 := make([]byte, Word*2)
	binary.LittleEndian.PutUint64(, )
	.Buf = append(.Buf, ...)
}

// PutDouble serializes v as 64-bit floating point.
func ( *Buffer) ( float64) {
	.PutUint64(math.Float64bits())
}

// PutInt128 serializes v as 128-bit signed integer.
func ( *Buffer) ( Int128) {
	.Buf = append(.Buf, [:]...)
}

// PutInt256 serializes v as 256-bit signed integer.
func ( *Buffer) ( Int256) {
	.Buf = append(.Buf, [:]...)
}

// Reset buffer to zero length.
func ( *Buffer) () {
	.Buf = .Buf[:0]
}