func (be *binaryEncoder) WriteArrayStart(count int64) {
	be.writeItemCount(count)
}
WriteArrayStart should be called when starting to serialize an array providing it with a number of items in
array block.
package avro
import (
	"encoding/binary"
	"io"
	"math"
)
type Encoder interface {
	WriteNull(interface{})
	WriteBoolean(bool)
	WriteInt(int32)
	WriteLong(int64)
	WriteFloat(float32)
	WriteDouble(float64)
	WriteBytes([]byte)
	WriteString(string)
	WriteArrayStart(int64)
	WriteArrayNext(int64)
	WriteMapStart(int64)
	WriteMapNext(int64)
	WriteRaw([]byte)
}
type binaryEncoder struct {
	buffer io.Writer
}
func NewBinaryEncoder(buffer io.Writer) Encoder {
	return newBinaryEncoder(buffer)
}
func newBinaryEncoder(buffer io.Writer) *binaryEncoder {
	return &binaryEncoder{buffer: buffer}
}
func (be *binaryEncoder) WriteNull(_ interface{}) {
}
var encBoolTrue = []byte{0x01}
var encBoolFalse = []byte{0x00}
func (be *binaryEncoder) WriteBoolean(x bool) {
	if x {
		_, _ = be.buffer.Write(encBoolTrue)
	} else {
		_, _ = be.buffer.Write(encBoolFalse)
	}
}
func (be *binaryEncoder) WriteInt(x int32) {
	_, _ = be.buffer.Write(be.encodeVarint32(x))
}
func (be *binaryEncoder) WriteLong(x int64) {
	_, _ = be.buffer.Write(be.encodeVarint64(x))
}
func (be *binaryEncoder) WriteFloat(x float32) {
	bytes := make([]byte, 4)
	binary.LittleEndian.PutUint32(bytes, math.Float32bits(x))
	_, _ = be.buffer.Write(bytes)
}
func (be *binaryEncoder) WriteDouble(x float64) {
	bytes := make([]byte, 8)
	binary.LittleEndian.PutUint64(bytes, math.Float64bits(x))
	_, _ = be.buffer.Write(bytes)
}
func (be *binaryEncoder) WriteRaw(x []byte) {
	_, _ = be.buffer.Write(x)
}
func (be *binaryEncoder) WriteBytes(x []byte) {
	be.WriteLong(int64(len(x)))
	_, _ = be.buffer.Write(x)
}
func (be *binaryEncoder) WriteString(x string) {
	be.WriteLong(int64(len(x)))
	_, _ = io.WriteString(be.buffer, x)
}