// Code generated by go run encgen.go -output enc_helpers.go; DO NOT EDIT.

// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package gob

import (
	
)

var encArrayHelper = map[reflect.Kind]encHelper{
	reflect.Bool:       encBoolArray,
	reflect.Complex64:  encComplex64Array,
	reflect.Complex128: encComplex128Array,
	reflect.Float32:    encFloat32Array,
	reflect.Float64:    encFloat64Array,
	reflect.Int:        encIntArray,
	reflect.Int16:      encInt16Array,
	reflect.Int32:      encInt32Array,
	reflect.Int64:      encInt64Array,
	reflect.Int8:       encInt8Array,
	reflect.String:     encStringArray,
	reflect.Uint:       encUintArray,
	reflect.Uint16:     encUint16Array,
	reflect.Uint32:     encUint32Array,
	reflect.Uint64:     encUint64Array,
	reflect.Uintptr:    encUintptrArray,
}

var encSliceHelper = map[reflect.Kind]encHelper{
	reflect.Bool:       encBoolSlice,
	reflect.Complex64:  encComplex64Slice,
	reflect.Complex128: encComplex128Slice,
	reflect.Float32:    encFloat32Slice,
	reflect.Float64:    encFloat64Slice,
	reflect.Int:        encIntSlice,
	reflect.Int16:      encInt16Slice,
	reflect.Int32:      encInt32Slice,
	reflect.Int64:      encInt64Slice,
	reflect.Int8:       encInt8Slice,
	reflect.String:     encStringSlice,
	reflect.Uint:       encUintSlice,
	reflect.Uint16:     encUint16Slice,
	reflect.Uint32:     encUint32Slice,
	reflect.Uint64:     encUint64Slice,
	reflect.Uintptr:    encUintptrSlice,
}

func encBoolArray( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encBoolSlice(, .Slice(0, .Len()))
}

func encBoolSlice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]bool)
	if ! {
		// It is kind bool but not type bool. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != false || .sendZero {
			if  {
				.encodeUint(1)
			} else {
				.encodeUint(0)
			}
		}
	}
	return true
}

func encComplex64Array( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encComplex64Slice(, .Slice(0, .Len()))
}

func encComplex64Slice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]complex64)
	if ! {
		// It is kind complex64 but not type complex64. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != 0+0i || .sendZero {
			 := floatBits(float64(real()))
			 := floatBits(float64(imag()))
			.encodeUint()
			.encodeUint()
		}
	}
	return true
}

func encComplex128Array( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encComplex128Slice(, .Slice(0, .Len()))
}

func encComplex128Slice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]complex128)
	if ! {
		// It is kind complex128 but not type complex128. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != 0+0i || .sendZero {
			 := floatBits(real())
			 := floatBits(imag())
			.encodeUint()
			.encodeUint()
		}
	}
	return true
}

func encFloat32Array( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encFloat32Slice(, .Slice(0, .Len()))
}

func encFloat32Slice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]float32)
	if ! {
		// It is kind float32 but not type float32. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != 0 || .sendZero {
			 := floatBits(float64())
			.encodeUint()
		}
	}
	return true
}

func encFloat64Array( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encFloat64Slice(, .Slice(0, .Len()))
}

func encFloat64Slice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]float64)
	if ! {
		// It is kind float64 but not type float64. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != 0 || .sendZero {
			 := floatBits()
			.encodeUint()
		}
	}
	return true
}

func encIntArray( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encIntSlice(, .Slice(0, .Len()))
}

func encIntSlice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]int)
	if ! {
		// It is kind int but not type int. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != 0 || .sendZero {
			.encodeInt(int64())
		}
	}
	return true
}

func encInt16Array( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encInt16Slice(, .Slice(0, .Len()))
}

func encInt16Slice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]int16)
	if ! {
		// It is kind int16 but not type int16. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != 0 || .sendZero {
			.encodeInt(int64())
		}
	}
	return true
}

func encInt32Array( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encInt32Slice(, .Slice(0, .Len()))
}

func encInt32Slice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]int32)
	if ! {
		// It is kind int32 but not type int32. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != 0 || .sendZero {
			.encodeInt(int64())
		}
	}
	return true
}

func encInt64Array( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encInt64Slice(, .Slice(0, .Len()))
}

func encInt64Slice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]int64)
	if ! {
		// It is kind int64 but not type int64. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != 0 || .sendZero {
			.encodeInt()
		}
	}
	return true
}

func encInt8Array( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encInt8Slice(, .Slice(0, .Len()))
}

func encInt8Slice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]int8)
	if ! {
		// It is kind int8 but not type int8. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != 0 || .sendZero {
			.encodeInt(int64())
		}
	}
	return true
}

func encStringArray( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encStringSlice(, .Slice(0, .Len()))
}

func encStringSlice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]string)
	if ! {
		// It is kind string but not type string. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != "" || .sendZero {
			.encodeUint(uint64(len()))
			.b.WriteString()
		}
	}
	return true
}

func encUintArray( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encUintSlice(, .Slice(0, .Len()))
}

func encUintSlice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]uint)
	if ! {
		// It is kind uint but not type uint. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != 0 || .sendZero {
			.encodeUint(uint64())
		}
	}
	return true
}

func encUint16Array( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encUint16Slice(, .Slice(0, .Len()))
}

func encUint16Slice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]uint16)
	if ! {
		// It is kind uint16 but not type uint16. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != 0 || .sendZero {
			.encodeUint(uint64())
		}
	}
	return true
}

func encUint32Array( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encUint32Slice(, .Slice(0, .Len()))
}

func encUint32Slice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]uint32)
	if ! {
		// It is kind uint32 but not type uint32. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != 0 || .sendZero {
			.encodeUint(uint64())
		}
	}
	return true
}

func encUint64Array( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encUint64Slice(, .Slice(0, .Len()))
}

func encUint64Slice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]uint64)
	if ! {
		// It is kind uint64 but not type uint64. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != 0 || .sendZero {
			.encodeUint()
		}
	}
	return true
}

func encUintptrArray( *encoderState,  reflect.Value) bool {
	// Can only slice if it is addressable.
	if !.CanAddr() {
		return false
	}
	return encUintptrSlice(, .Slice(0, .Len()))
}

func encUintptrSlice( *encoderState,  reflect.Value) bool {
	,  := .Interface().([]uintptr)
	if ! {
		// It is kind uintptr but not type uintptr. TODO: We can handle this unsafely.
		return false
	}
	for ,  := range  {
		if  != 0 || .sendZero {
			.encodeUint(uint64())
		}
	}
	return true
}