// Code generated by the FlatBuffers compiler. DO NOT EDIT.

package zinfo

import (
	flatbuffers "github.com/google/flatbuffers/go"
)

type TarZinfo struct {
	_tab flatbuffers.Table
}

func GetRootAsTarZinfo(buf []byte, offset flatbuffers.UOffsetT) *TarZinfo {
	n := flatbuffers.GetUOffsetT(buf[offset:])
	x := &TarZinfo{}
	x.Init(buf, n+offset)
	return x
}

func GetSizePrefixedRootAsTarZinfo(buf []byte, offset flatbuffers.UOffsetT) *TarZinfo {
	n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
	x := &TarZinfo{}
	x.Init(buf, n+offset+flatbuffers.SizeUint32)
	return x
}

func (rcv *TarZinfo) Init(buf []byte, i flatbuffers.UOffsetT) {
	rcv._tab.Bytes = buf
	rcv._tab.Pos = i
}

func (rcv *TarZinfo) Table() flatbuffers.Table {
	return rcv._tab
}

func (rcv *TarZinfo) Version() int32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.GetInt32(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *TarZinfo) MutateVersion(n int32) bool {
	return rcv._tab.MutateInt32Slot(4, n)
}

func (rcv *TarZinfo) SpanSize() int64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return rcv._tab.GetInt64(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *TarZinfo) MutateSpanSize(n int64) bool {
	return rcv._tab.MutateInt64Slot(6, n)
}

func (rcv *TarZinfo) Size() int64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		return rcv._tab.GetInt64(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *TarZinfo) MutateSize(n int64) bool {
	return rcv._tab.MutateInt64Slot(8, n)
}

func TarZinfoStart(builder *flatbuffers.Builder) {
	builder.StartObject(3)
}
func TarZinfoAddVersion(builder *flatbuffers.Builder, version int32) {
	builder.PrependInt32Slot(0, version, 0)
}
func TarZinfoAddSpanSize(builder *flatbuffers.Builder, spanSize int64) {
	builder.PrependInt64Slot(1, spanSize, 0)
}
func TarZinfoAddSize(builder *flatbuffers.Builder, size int64) {
	builder.PrependInt64Slot(2, size, 0)
}
func TarZinfoEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
