func (c *CodeTrieBig) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf
	offset := int(39)
	if c.Metadata == nil {
		c.Metadata = new(Metadata)
	}
	if dst, err = c.Metadata.MarshalSSZTo(dst); err != nil {
		return
	}
	dst = ssz.WriteOffset(dst, offset)
	offset += len(c.Chunks) * 33
	if len(c.Chunks) > 1024 {
		err = ssz.ErrListTooBig
		return
	}
	for ii := 0; ii < len(c.Chunks); ii++ {
		if dst, err = c.Chunks[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}
	return
}
MarshalSSZTo ssz marshals the CodeTrieBig object to a target array
package tests
import (
	ssz "github.com/ferranbt/fastssz"
)
func (m *Metadata) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(m)
}
func (m *Metadata) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf
	dst = ssz.MarshalUint8(dst, m.Version)
	if len(m.CodeHash) != 32 {
		err = ssz.ErrBytesLength
		return
	}
	dst = append(dst, m.CodeHash...)
	dst = ssz.MarshalUint16(dst, m.CodeLength)
	return
}
func (m *Metadata) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size != 35 {
		return ssz.ErrSize
	}
	m.Version = ssz.UnmarshallUint8(buf[0:1])
	if cap(m.CodeHash) == 0 {
		m.CodeHash = make([]byte, 0, len(buf[1:33]))
	}
	m.CodeHash = append(m.CodeHash, buf[1:33]...)
	m.CodeLength = ssz.UnmarshallUint16(buf[33:35])
	return err
}
func (m *Metadata) SizeSSZ() (size int) {
	size = 35
	return
}
func (m *Metadata) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(m)
}
func (m *Metadata) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()
	hh.PutUint8(m.Version)
	if len(m.CodeHash) != 32 {
		err = ssz.ErrBytesLength
		return
	}
	hh.PutBytes(m.CodeHash)
	hh.PutUint16(m.CodeLength)
	hh.Merkleize(indx)
	return
}
func (m *Metadata) GetTreeWithWrapper(w *ssz.Wrapper) (err error) {
	indx := w.Indx()
	w.AddUint8(m.Version)
	if len(m.CodeHash) != 32 {
		err = ssz.ErrBytesLength
		return
	}
	w.AddBytes(m.CodeHash)
	w.AddUint16(m.CodeLength)
	for i := 0; i < 1; i++ {
		w.AddEmpty()
	}
	w.Commit(indx)
	return nil
}
func (m *Metadata) GetTree() (*ssz.Node, error) {
	w := &ssz.Wrapper{}
	if err := m.GetTreeWithWrapper(w); err != nil {
		return nil, err
	}
	return w.Node(), nil
}
func (c *Chunk) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(c)
}
func (c *Chunk) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf
	dst = ssz.MarshalUint8(dst, c.FIO)
	if len(c.Code) != 32 {
		err = ssz.ErrBytesLength
		return
	}
	dst = append(dst, c.Code...)
	return
}
func (c *Chunk) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size != 33 {
		return ssz.ErrSize
	}
	c.FIO = ssz.UnmarshallUint8(buf[0:1])
	if cap(c.Code) == 0 {
		c.Code = make([]byte, 0, len(buf[1:33]))
	}
	c.Code = append(c.Code, buf[1:33]...)
	return err
}
func (c *Chunk) SizeSSZ() (size int) {
	size = 33
	return
}
func (c *Chunk) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(c)
}
func (c *Chunk) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()
	hh.PutUint8(c.FIO)
	if len(c.Code) != 32 {
		err = ssz.ErrBytesLength
		return
	}
	hh.PutBytes(c.Code)
	hh.Merkleize(indx)
	return
}
func (c *Chunk) GetTreeWithWrapper(w *ssz.Wrapper) (err error) {
	indx := w.Indx()
	w.AddUint8(c.FIO)
	if len(c.Code) != 32 {
		err = ssz.ErrBytesLength
		return
	}
	w.AddBytes(c.Code)
	w.Commit(indx)
	return nil
}
func (c *Chunk) GetTree() (*ssz.Node, error) {
	w := &ssz.Wrapper{}
	if err := c.GetTreeWithWrapper(w); err != nil {
		return nil, err
	}
	return w.Node(), nil
}
func (c *CodeTrieSmall) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(c)
}
func (c *CodeTrieSmall) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf
	offset := int(39)
	if c.Metadata == nil {
		c.Metadata = new(Metadata)
	}
	if dst, err = c.Metadata.MarshalSSZTo(dst); err != nil {
		return
	}
	dst = ssz.WriteOffset(dst, offset)
	offset += len(c.Chunks) * 33
	if len(c.Chunks) > 4 {
		err = ssz.ErrListTooBig
		return
	}
	for ii := 0; ii < len(c.Chunks); ii++ {
		if dst, err = c.Chunks[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}
	return
}
func (c *CodeTrieSmall) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size < 39 {
		return ssz.ErrSize
	}
	tail := buf
	var o1 uint64
	if c.Metadata == nil {
		c.Metadata = new(Metadata)
	}
	if err = c.Metadata.UnmarshalSSZ(buf[0:35]); err != nil {
		return err
	}
	if o1 = ssz.ReadOffset(buf[35:39]); o1 > size {
		return ssz.ErrOffset
	}
	{
		buf = tail[o1:]
		num, err := ssz.DivideInt2(len(buf), 33, 4)
		if err != nil {
			return err
		}
		c.Chunks = make([]*Chunk, num)
		for ii := 0; ii < num; ii++ {
			if c.Chunks[ii] == nil {
				c.Chunks[ii] = new(Chunk)
			}
			if err = c.Chunks[ii].UnmarshalSSZ(buf[ii*33 : (ii+1)*33]); err != nil {
				return err
			}
		}
	}
	return err
}
func (c *CodeTrieSmall) SizeSSZ() (size int) {
	size = 39
	size += len(c.Chunks) * 33
	return
}
func (c *CodeTrieSmall) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(c)
}
func (c *CodeTrieSmall) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()
	if err = c.Metadata.HashTreeRootWith(hh); err != nil {
		return
	}
	{
		subIndx := hh.Index()
		num := uint64(len(c.Chunks))
		if num > 4 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for i := uint64(0); i < num; i++ {
			if err = c.Chunks[i].HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 4)
	}
	hh.Merkleize(indx)
	return
}
func (c *CodeTrieSmall) GetTreeWithWrapper(w *ssz.Wrapper) (err error) {
	indx := w.Indx()
	if err := c.Metadata.GetTreeWithWrapper(w); err != nil {
		return err
	}
	{
		subIdx := w.Indx()
		num := len(c.Chunks)
		if num > 4 {
			err = ssz.ErrIncorrectListSize
			return err
		}
		for i := 0; i < num; i++ {
			n, err := c.Chunks[i].GetTree()
			if err != nil {
				return err
			}
			w.AddNode(n)
		}
		w.CommitWithMixin(subIdx, num, 4)
	}
	w.Commit(indx)
	return nil
}
func (c *CodeTrieSmall) GetTree() (*ssz.Node, error) {
	w := &ssz.Wrapper{}
	if err := c.GetTreeWithWrapper(w); err != nil {
		return nil, err
	}
	return w.Node(), nil
}
func (c *CodeTrieBig) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(c)
}