// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: sparse.proto

package indexheaderpb

import (
	fmt "fmt"
	_ "github.com/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
	io "io"
	math "math"
	math_bits "math/bits"
	reflect "reflect"
	strings "strings"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package

type Sparse struct {
	Symbols             *Symbols            `protobuf:"bytes,1,opt,name=symbols,proto3" json:"symbols,omitempty"`
	PostingsOffsetTable *PostingOffsetTable `protobuf:"bytes,2,opt,name=postingsOffsetTable,proto3" json:"postingsOffsetTable,omitempty"`
}

func (m *Sparse) Reset()      { *m = Sparse{} }
func (*Sparse) ProtoMessage() {}
func (*Sparse) Descriptor() ([]byte, []int) {
	return fileDescriptor_c442573753a956c7, []int{0}
}
func (m *Sparse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Sparse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Sparse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *Sparse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Sparse.Merge(m, src)
}
func (m *Sparse) XXX_Size() int {
	return m.Size()
}
func (m *Sparse) XXX_DiscardUnknown() {
	xxx_messageInfo_Sparse.DiscardUnknown(m)
}

var xxx_messageInfo_Sparse proto.InternalMessageInfo

func (m *Sparse) GetSymbols() *Symbols {
	if m != nil {
		return m.Symbols
	}
	return nil
}

func (m *Sparse) GetPostingsOffsetTable() *PostingOffsetTable {
	if m != nil {
		return m.PostingsOffsetTable
	}
	return nil
}

type Symbols struct {
	Offsets      []int64 `protobuf:"varint,1,rep,packed,name=offsets,proto3" json:"offsets,omitempty"`
	SymbolsCount int64   `protobuf:"varint,2,opt,name=symbolsCount,proto3" json:"symbolsCount,omitempty"`
}

func (m *Symbols) Reset()      { *m = Symbols{} }
func (*Symbols) ProtoMessage() {}
func (*Symbols) Descriptor() ([]byte, []int) {
	return fileDescriptor_c442573753a956c7, []int{1}
}
func (m *Symbols) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Symbols) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Symbols.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *Symbols) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Symbols.Merge(m, src)
}
func (m *Symbols) XXX_Size() int {
	return m.Size()
}
func (m *Symbols) XXX_DiscardUnknown() {
	xxx_messageInfo_Symbols.DiscardUnknown(m)
}

var xxx_messageInfo_Symbols proto.InternalMessageInfo

func (m *Symbols) GetOffsets() []int64 {
	if m != nil {
		return m.Offsets
	}
	return nil
}

func (m *Symbols) GetSymbolsCount() int64 {
	if m != nil {
		return m.SymbolsCount
	}
	return 0
}

type PostingOffsetTable struct {
	// Postings is a map of label names -> PostingValueOffsets
	Postings map[string]*PostingValueOffsets `protobuf:"bytes,1,rep,name=postings,proto3" json:"postings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}

func (m *PostingOffsetTable) Reset()      { *m = PostingOffsetTable{} }
func (*PostingOffsetTable) ProtoMessage() {}
func (*PostingOffsetTable) Descriptor() ([]byte, []int) {
	return fileDescriptor_c442573753a956c7, []int{2}
}
func (m *PostingOffsetTable) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *PostingOffsetTable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_PostingOffsetTable.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *PostingOffsetTable) XXX_Merge(src proto.Message) {
	xxx_messageInfo_PostingOffsetTable.Merge(m, src)
}
func (m *PostingOffsetTable) XXX_Size() int {
	return m.Size()
}
func (m *PostingOffsetTable) XXX_DiscardUnknown() {
	xxx_messageInfo_PostingOffsetTable.DiscardUnknown(m)
}

var xxx_messageInfo_PostingOffsetTable proto.InternalMessageInfo

func (m *PostingOffsetTable) GetPostings() map[string]*PostingValueOffsets {
	if m != nil {
		return m.Postings
	}
	return nil
}

// PostingValueOffsets stores a list of the first, last, and every 32nd (config default) PostingOffset for this label name.
type PostingValueOffsets struct {
	Offsets []*PostingOffset `protobuf:"bytes,1,rep,name=offsets,proto3" json:"offsets,omitempty"`
	// LastValOffset is the offset of the last value for this label name relative to the start of the postings offset table.
	LastValOffset int64 `protobuf:"varint,2,opt,name=lastValOffset,proto3" json:"lastValOffset,omitempty"`
}

func (m *PostingValueOffsets) Reset()      { *m = PostingValueOffsets{} }
func (*PostingValueOffsets) ProtoMessage() {}
func (*PostingValueOffsets) Descriptor() ([]byte, []int) {
	return fileDescriptor_c442573753a956c7, []int{3}
}
func (m *PostingValueOffsets) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *PostingValueOffsets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_PostingValueOffsets.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *PostingValueOffsets) XXX_Merge(src proto.Message) {
	xxx_messageInfo_PostingValueOffsets.Merge(m, src)
}
func (m *PostingValueOffsets) XXX_Size() int {
	return m.Size()
}
func (m *PostingValueOffsets) XXX_DiscardUnknown() {
	xxx_messageInfo_PostingValueOffsets.DiscardUnknown(m)
}

var xxx_messageInfo_PostingValueOffsets proto.InternalMessageInfo

func (m *PostingValueOffsets) GetOffsets() []*PostingOffset {
	if m != nil {
		return m.Offsets
	}
	return nil
}

func (m *PostingValueOffsets) GetLastValOffset() int64 {
	if m != nil {
		return m.LastValOffset
	}
	return 0
}

// PostingOffset stores the label value and its offset in the postings offset table relative to the start of the table.
type PostingOffset struct {
	Value    string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	TableOff int64  `protobuf:"varint,2,opt,name=tableOff,proto3" json:"tableOff,omitempty"`
}

func (m *PostingOffset) Reset()      { *m = PostingOffset{} }
func (*PostingOffset) ProtoMessage() {}
func (*PostingOffset) Descriptor() ([]byte, []int) {
	return fileDescriptor_c442573753a956c7, []int{4}
}
func (m *PostingOffset) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *PostingOffset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_PostingOffset.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *PostingOffset) XXX_Merge(src proto.Message) {
	xxx_messageInfo_PostingOffset.Merge(m, src)
}
func (m *PostingOffset) XXX_Size() int {
	return m.Size()
}
func (m *PostingOffset) XXX_DiscardUnknown() {
	xxx_messageInfo_PostingOffset.DiscardUnknown(m)
}

var xxx_messageInfo_PostingOffset proto.InternalMessageInfo

func (m *PostingOffset) GetValue() string {
	if m != nil {
		return m.Value
	}
	return ""
}

func (m *PostingOffset) GetTableOff() int64 {
	if m != nil {
		return m.TableOff
	}
	return 0
}

func init() {
	proto.RegisterType((*Sparse)(nil), "indexheaderpb.Sparse")
	proto.RegisterType((*Symbols)(nil), "indexheaderpb.Symbols")
	proto.RegisterType((*PostingOffsetTable)(nil), "indexheaderpb.PostingOffsetTable")
	proto.RegisterMapType((map[string]*PostingValueOffsets)(nil), "indexheaderpb.PostingOffsetTable.PostingsEntry")
	proto.RegisterType((*PostingValueOffsets)(nil), "indexheaderpb.PostingValueOffsets")
	proto.RegisterType((*PostingOffset)(nil), "indexheaderpb.PostingOffset")
}

func init() { proto.RegisterFile("sparse.proto", fileDescriptor_c442573753a956c7) }

var fileDescriptor_c442573753a956c7 = []byte{
	// 402 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x3f, 0x4f, 0xf2, 0x40,
	0x18, 0xef, 0xd1, 0xbc, 0xc0, 0x7b, 0x40, 0x42, 0x0e, 0x63, 0x08, 0x21, 0x17, 0x6d, 0x1c, 0x58,
	0x2c, 0x06, 0x13, 0x43, 0xdc, 0x84, 0x38, 0x31, 0x60, 0x8a, 0x61, 0x70, 0x31, 0xad, 0xb4, 0x85,
	0x58, 0x7a, 0x4d, 0xef, 0x6a, 0x64, 0xf3, 0x1b, 0xe8, 0xc7, 0xf0, 0x73, 0x38, 0x39, 0x32, 0x32,
	0x4a, 0x59, 0x1c, 0xf9, 0x08, 0xa6, 0x77, 0x2d, 0x5a, 0x25, 0xba, 0xdd, 0xf3, 0x3c, 0xbf, 0x3f,
	0xcf, 0xf3, 0xcb, 0xc1, 0x22, 0xf5, 0x74, 0x9f, 0x9a, 0xaa, 0xe7, 0x13, 0x46, 0x50, 0x69, 0xe2,
	0x8e, 0xcc, 0xfb, 0xb1, 0xa9, 0x8f, 0x4c, 0xdf, 0x33, 0x6a, 0x87, 0xf6, 0x84, 0x8d, 0x03, 0x43,
	0xbd, 0x21, 0xd3, 0xa6, 0x4d, 0x6c, 0xd2, 0xe4, 0x28, 0x23, 0xb0, 0x78, 0xc5, 0x0b, 0xfe, 0x12,
	0x6c, 0xe5, 0x11, 0xc0, 0xec, 0x80, 0xcb, 0xa1, 0x23, 0x98, 0xa3, 0xb3, 0xa9, 0x41, 0x1c, 0x5a,
	0x05, 0x7b, 0xa0, 0x51, 0x68, 0xed, 0xaa, 0x29, 0x69, 0x75, 0x20, 0xa6, 0x5a, 0x02, 0x43, 0x03,
	0x58, 0xf1, 0x08, 0x65, 0x13, 0xd7, 0xa6, 0x7d, 0xcb, 0xa2, 0x26, 0xbb, 0xd4, 0x0d, 0xc7, 0xac,
	0x66, 0x38, 0x7b, 0xff, 0x1b, 0xfb, 0x42, 0x20, 0xbf, 0x00, 0xb5, 0x6d, 0x6c, 0xa5, 0x07, 0x73,
	0xb1, 0x11, 0xaa, 0xc3, 0x1c, 0xe1, 0x93, 0x68, 0x23, 0xb9, 0x21, 0x77, 0x32, 0x65, 0xa0, 0x25,
	0x2d, 0xa4, 0xc0, 0x62, 0xbc, 0x48, 0x97, 0x04, 0x2e, 0xe3, 0xb6, 0xb2, 0x96, 0xea, 0x29, 0x2f,
	0x00, 0xa2, 0x9f, 0xc6, 0xa8, 0x07, 0xf3, 0x89, 0x35, 0x57, 0x2e, 0xb4, 0x9a, 0x7f, 0x6e, 0x9b,
	0xb4, 0xe8, 0xb9, 0xcb, 0xfc, 0x99, 0xb6, 0x11, 0xa8, 0x5d, 0xc3, 0x52, 0x6a, 0x84, 0xca, 0x50,
	0xbe, 0x35, 0x67, 0x3c, 0xc4, 0xff, 0x5a, 0xf4, 0x44, 0x6d, 0xf8, 0xef, 0x4e, 0x77, 0x82, 0x24,
	0x1a, 0x65, 0xbb, 0xd9, 0x30, 0x82, 0x08, 0x47, 0xaa, 0x09, 0xc2, 0x69, 0xa6, 0x0d, 0x14, 0x0a,
	0x2b, 0x5b, 0x10, 0xe8, 0x24, 0x9d, 0x4e, 0xa1, 0x55, 0xff, 0xed, 0x86, 0xcf, 0xdc, 0x0e, 0x60,
	0xc9, 0xd1, 0x29, 0x1b, 0xea, 0x8e, 0x98, 0xc4, 0xc1, 0xa5, 0x9b, 0xca, 0xd9, 0xe6, 0x2a, 0xd1,
	0x40, 0x3b, 0xc9, 0x0d, 0xe2, 0x2e, 0x51, 0xa0, 0x1a, 0xcc, 0xb3, 0x28, 0x9d, 0xbe, 0x65, 0xc5,
	0x3a, 0x9b, 0xba, 0xd3, 0x9d, 0x2f, 0xb1, 0xb4, 0x58, 0x62, 0x69, 0xbd, 0xc4, 0xe0, 0x21, 0xc4,
	0xe0, 0x39, 0xc4, 0xe0, 0x35, 0xc4, 0x60, 0x1e, 0x62, 0xf0, 0x16, 0x62, 0xf0, 0x1e, 0x62, 0x69,
	0x1d, 0x62, 0xf0, 0xb4, 0xc2, 0xd2, 0x7c, 0x85, 0xa5, 0xc5, 0x0a, 0x4b, 0x57, 0xe9, 0xff, 0x6c,
	0x64, 0xf9, 0x3f, 0x3d, 0xfe, 0x08, 0x00, 0x00, 0xff, 0xff, 0x81, 0x2f, 0x9e, 0xda, 0xf5, 0x02,
	0x00, 0x00,
}

func (this *Sparse) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*Sparse)
	if !ok {
		that2, ok := that.(Sparse)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if !this.Symbols.Equal(that1.Symbols) {
		return false
	}
	if !this.PostingsOffsetTable.Equal(that1.PostingsOffsetTable) {
		return false
	}
	return true
}
func (this *Symbols) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*Symbols)
	if !ok {
		that2, ok := that.(Symbols)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if len(this.Offsets) != len(that1.Offsets) {
		return false
	}
	for i := range this.Offsets {
		if this.Offsets[i] != that1.Offsets[i] {
			return false
		}
	}
	if this.SymbolsCount != that1.SymbolsCount {
		return false
	}
	return true
}
func (this *PostingOffsetTable) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*PostingOffsetTable)
	if !ok {
		that2, ok := that.(PostingOffsetTable)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if len(this.Postings) != len(that1.Postings) {
		return false
	}
	for i := range this.Postings {
		if !this.Postings[i].Equal(that1.Postings[i]) {
			return false
		}
	}
	return true
}
func (this *PostingValueOffsets) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*PostingValueOffsets)
	if !ok {
		that2, ok := that.(PostingValueOffsets)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if len(this.Offsets) != len(that1.Offsets) {
		return false
	}
	for i := range this.Offsets {
		if !this.Offsets[i].Equal(that1.Offsets[i]) {
			return false
		}
	}
	if this.LastValOffset != that1.LastValOffset {
		return false
	}
	return true
}
func (this *PostingOffset) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*PostingOffset)
	if !ok {
		that2, ok := that.(PostingOffset)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if this.Value != that1.Value {
		return false
	}
	if this.TableOff != that1.TableOff {
		return false
	}
	return true
}
func (this *Sparse) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 6)
	s = append(s, "&indexheaderpb.Sparse{")
	if this.Symbols != nil {
		s = append(s, "Symbols: "+fmt.Sprintf("%#v", this.Symbols)+",\n")
	}
	if this.PostingsOffsetTable != nil {
		s = append(s, "PostingsOffsetTable: "+fmt.Sprintf("%#v", this.PostingsOffsetTable)+",\n")
	}
	s = append(s, "}")
	return strings.Join(s, "")
}
func (this *Symbols) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 6)
	s = append(s, "&indexheaderpb.Symbols{")
	s = append(s, "Offsets: "+fmt.Sprintf("%#v", this.Offsets)+",\n")
	s = append(s, "SymbolsCount: "+fmt.Sprintf("%#v", this.SymbolsCount)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func (this *PostingOffsetTable) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 5)
	s = append(s, "&indexheaderpb.PostingOffsetTable{")
	keysForPostings := make([]string, 0, len(this.Postings))
	for k, _ := range this.Postings {
		keysForPostings = append(keysForPostings, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForPostings)
	mapStringForPostings := "map[string]*PostingValueOffsets{"
	for _, k := range keysForPostings {
		mapStringForPostings += fmt.Sprintf("%#v: %#v,", k, this.Postings[k])
	}
	mapStringForPostings += "}"
	if this.Postings != nil {
		s = append(s, "Postings: "+mapStringForPostings+",\n")
	}
	s = append(s, "}")
	return strings.Join(s, "")
}
func (this *PostingValueOffsets) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 6)
	s = append(s, "&indexheaderpb.PostingValueOffsets{")
	if this.Offsets != nil {
		s = append(s, "Offsets: "+fmt.Sprintf("%#v", this.Offsets)+",\n")
	}
	s = append(s, "LastValOffset: "+fmt.Sprintf("%#v", this.LastValOffset)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func (this *PostingOffset) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 6)
	s = append(s, "&indexheaderpb.PostingOffset{")
	s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
	s = append(s, "TableOff: "+fmt.Sprintf("%#v", this.TableOff)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func valueToGoStringSparse(v interface{}, typ string) string {
	rv := reflect.ValueOf(v)
	if rv.IsNil() {
		return "nil"
	}
	pv := reflect.Indirect(rv).Interface()
	return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func (m *Sparse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Sparse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Sparse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.PostingsOffsetTable != nil {
		{
			size, err := m.PostingsOffsetTable.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintSparse(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	if m.Symbols != nil {
		{
			size, err := m.Symbols.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintSparse(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *Symbols) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Symbols) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Symbols) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.SymbolsCount != 0 {
		i = encodeVarintSparse(dAtA, i, uint64(m.SymbolsCount))
		i--
		dAtA[i] = 0x10
	}
	if len(m.Offsets) > 0 {
		dAtA4 := make([]byte, len(m.Offsets)*10)
		var j3 int
		for _, num1 := range m.Offsets {
			num := uint64(num1)
			for num >= 1<<7 {
				dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80)
				num >>= 7
				j3++
			}
			dAtA4[j3] = uint8(num)
			j3++
		}
		i -= j3
		copy(dAtA[i:], dAtA4[:j3])
		i = encodeVarintSparse(dAtA, i, uint64(j3))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *PostingOffsetTable) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *PostingOffsetTable) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *PostingOffsetTable) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Postings) > 0 {
		for k := range m.Postings {
			v := m.Postings[k]
			baseI := i
			if v != nil {
				{
					size, err := v.MarshalToSizedBuffer(dAtA[:i])
					if err != nil {
						return 0, err
					}
					i -= size
					i = encodeVarintSparse(dAtA, i, uint64(size))
				}
				i--
				dAtA[i] = 0x12
			}
			i -= len(k)
			copy(dAtA[i:], k)
			i = encodeVarintSparse(dAtA, i, uint64(len(k)))
			i--
			dAtA[i] = 0xa
			i = encodeVarintSparse(dAtA, i, uint64(baseI-i))
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

func (m *PostingValueOffsets) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *PostingValueOffsets) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *PostingValueOffsets) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.LastValOffset != 0 {
		i = encodeVarintSparse(dAtA, i, uint64(m.LastValOffset))
		i--
		dAtA[i] = 0x10
	}
	if len(m.Offsets) > 0 {
		for iNdEx := len(m.Offsets) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.Offsets[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintSparse(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

func (m *PostingOffset) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *PostingOffset) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *PostingOffset) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.TableOff != 0 {
		i = encodeVarintSparse(dAtA, i, uint64(m.TableOff))
		i--
		dAtA[i] = 0x10
	}
	if len(m.Value) > 0 {
		i -= len(m.Value)
		copy(dAtA[i:], m.Value)
		i = encodeVarintSparse(dAtA, i, uint64(len(m.Value)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func encodeVarintSparse(dAtA []byte, offset int, v uint64) int {
	offset -= sovSparse(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *Sparse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Symbols != nil {
		l = m.Symbols.Size()
		n += 1 + l + sovSparse(uint64(l))
	}
	if m.PostingsOffsetTable != nil {
		l = m.PostingsOffsetTable.Size()
		n += 1 + l + sovSparse(uint64(l))
	}
	return n
}

func (m *Symbols) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.Offsets) > 0 {
		l = 0
		for _, e := range m.Offsets {
			l += sovSparse(uint64(e))
		}
		n += 1 + sovSparse(uint64(l)) + l
	}
	if m.SymbolsCount != 0 {
		n += 1 + sovSparse(uint64(m.SymbolsCount))
	}
	return n
}

func (m *PostingOffsetTable) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.Postings) > 0 {
		for k, v := range m.Postings {
			_ = k
			_ = v
			l = 0
			if v != nil {
				l = v.Size()
				l += 1 + sovSparse(uint64(l))
			}
			mapEntrySize := 1 + len(k) + sovSparse(uint64(len(k))) + l
			n += mapEntrySize + 1 + sovSparse(uint64(mapEntrySize))
		}
	}
	return n
}

func (m *PostingValueOffsets) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.Offsets) > 0 {
		for _, e := range m.Offsets {
			l = e.Size()
			n += 1 + l + sovSparse(uint64(l))
		}
	}
	if m.LastValOffset != 0 {
		n += 1 + sovSparse(uint64(m.LastValOffset))
	}
	return n
}

func (m *PostingOffset) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Value)
	if l > 0 {
		n += 1 + l + sovSparse(uint64(l))
	}
	if m.TableOff != 0 {
		n += 1 + sovSparse(uint64(m.TableOff))
	}
	return n
}

func sovSparse(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozSparse(x uint64) (n int) {
	return sovSparse(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *Sparse) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&Sparse{`,
		`Symbols:` + strings.Replace(this.Symbols.String(), "Symbols", "Symbols", 1) + `,`,
		`PostingsOffsetTable:` + strings.Replace(this.PostingsOffsetTable.String(), "PostingOffsetTable", "PostingOffsetTable", 1) + `,`,
		`}`,
	}, "")
	return s
}
func (this *Symbols) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&Symbols{`,
		`Offsets:` + fmt.Sprintf("%v", this.Offsets) + `,`,
		`SymbolsCount:` + fmt.Sprintf("%v", this.SymbolsCount) + `,`,
		`}`,
	}, "")
	return s
}
func (this *PostingOffsetTable) String() string {
	if this == nil {
		return "nil"
	}
	keysForPostings := make([]string, 0, len(this.Postings))
	for k, _ := range this.Postings {
		keysForPostings = append(keysForPostings, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForPostings)
	mapStringForPostings := "map[string]*PostingValueOffsets{"
	for _, k := range keysForPostings {
		mapStringForPostings += fmt.Sprintf("%v: %v,", k, this.Postings[k])
	}
	mapStringForPostings += "}"
	s := strings.Join([]string{`&PostingOffsetTable{`,
		`Postings:` + mapStringForPostings + `,`,
		`}`,
	}, "")
	return s
}
func (this *PostingValueOffsets) String() string {
	if this == nil {
		return "nil"
	}
	repeatedStringForOffsets := "[]*PostingOffset{"
	for _, f := range this.Offsets {
		repeatedStringForOffsets += strings.Replace(f.String(), "PostingOffset", "PostingOffset", 1) + ","
	}
	repeatedStringForOffsets += "}"
	s := strings.Join([]string{`&PostingValueOffsets{`,
		`Offsets:` + repeatedStringForOffsets + `,`,
		`LastValOffset:` + fmt.Sprintf("%v", this.LastValOffset) + `,`,
		`}`,
	}, "")
	return s
}
func (this *PostingOffset) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&PostingOffset{`,
		`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
		`TableOff:` + fmt.Sprintf("%v", this.TableOff) + `,`,
		`}`,
	}, "")
	return s
}
func valueToStringSparse(v interface{}) string {
	rv := reflect.ValueOf(v)
	if rv.IsNil() {
		return "nil"
	}
	pv := reflect.Indirect(rv).Interface()
	return fmt.Sprintf("*%v", pv)
}
func (m *Sparse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowSparse
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: Sparse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Sparse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Symbols", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSparse
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthSparse
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthSparse
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Symbols == nil {
				m.Symbols = &Symbols{}
			}
			if err := m.Symbols.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PostingsOffsetTable", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSparse
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthSparse
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthSparse
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.PostingsOffsetTable == nil {
				m.PostingsOffsetTable = &PostingOffsetTable{}
			}
			if err := m.PostingsOffsetTable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipSparse(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthSparse
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthSparse
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *Symbols) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowSparse
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: Symbols: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Symbols: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType == 0 {
				var v int64
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowSparse
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					v |= int64(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				m.Offsets = append(m.Offsets, v)
			} else if wireType == 2 {
				var packedLen int
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowSparse
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					packedLen |= int(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				if packedLen < 0 {
					return ErrInvalidLengthSparse
				}
				postIndex := iNdEx + packedLen
				if postIndex < 0 {
					return ErrInvalidLengthSparse
				}
				if postIndex > l {
					return io.ErrUnexpectedEOF
				}
				var elementCount int
				var count int
				for _, integer := range dAtA[iNdEx:postIndex] {
					if integer < 128 {
						count++
					}
				}
				elementCount = count
				if elementCount != 0 && len(m.Offsets) == 0 {
					m.Offsets = make([]int64, 0, elementCount)
				}
				for iNdEx < postIndex {
					var v int64
					for shift := uint(0); ; shift += 7 {
						if shift >= 64 {
							return ErrIntOverflowSparse
						}
						if iNdEx >= l {
							return io.ErrUnexpectedEOF
						}
						b := dAtA[iNdEx]
						iNdEx++
						v |= int64(b&0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					m.Offsets = append(m.Offsets, v)
				}
			} else {
				return fmt.Errorf("proto: wrong wireType = %d for field Offsets", wireType)
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field SymbolsCount", wireType)
			}
			m.SymbolsCount = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSparse
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.SymbolsCount |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipSparse(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthSparse
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthSparse
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *PostingOffsetTable) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowSparse
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: PostingOffsetTable: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: PostingOffsetTable: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Postings", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSparse
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthSparse
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthSparse
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Postings == nil {
				m.Postings = make(map[string]*PostingValueOffsets)
			}
			var mapkey string
			var mapvalue *PostingValueOffsets
			for iNdEx < postIndex {
				entryPreIndex := iNdEx
				var wire uint64
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowSparse
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					wire |= uint64(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				fieldNum := int32(wire >> 3)
				if fieldNum == 1 {
					var stringLenmapkey uint64
					for shift := uint(0); ; shift += 7 {
						if shift >= 64 {
							return ErrIntOverflowSparse
						}
						if iNdEx >= l {
							return io.ErrUnexpectedEOF
						}
						b := dAtA[iNdEx]
						iNdEx++
						stringLenmapkey |= uint64(b&0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					intStringLenmapkey := int(stringLenmapkey)
					if intStringLenmapkey < 0 {
						return ErrInvalidLengthSparse
					}
					postStringIndexmapkey := iNdEx + intStringLenmapkey
					if postStringIndexmapkey < 0 {
						return ErrInvalidLengthSparse
					}
					if postStringIndexmapkey > l {
						return io.ErrUnexpectedEOF
					}
					mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
					iNdEx = postStringIndexmapkey
				} else if fieldNum == 2 {
					var mapmsglen int
					for shift := uint(0); ; shift += 7 {
						if shift >= 64 {
							return ErrIntOverflowSparse
						}
						if iNdEx >= l {
							return io.ErrUnexpectedEOF
						}
						b := dAtA[iNdEx]
						iNdEx++
						mapmsglen |= int(b&0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					if mapmsglen < 0 {
						return ErrInvalidLengthSparse
					}
					postmsgIndex := iNdEx + mapmsglen
					if postmsgIndex < 0 {
						return ErrInvalidLengthSparse
					}
					if postmsgIndex > l {
						return io.ErrUnexpectedEOF
					}
					mapvalue = &PostingValueOffsets{}
					if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
						return err
					}
					iNdEx = postmsgIndex
				} else {
					iNdEx = entryPreIndex
					skippy, err := skipSparse(dAtA[iNdEx:])
					if err != nil {
						return err
					}
					if skippy < 0 {
						return ErrInvalidLengthSparse
					}
					if (iNdEx + skippy) > postIndex {
						return io.ErrUnexpectedEOF
					}
					iNdEx += skippy
				}
			}
			m.Postings[mapkey] = mapvalue
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipSparse(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthSparse
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthSparse
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *PostingValueOffsets) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowSparse
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: PostingValueOffsets: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: PostingValueOffsets: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Offsets", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSparse
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthSparse
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthSparse
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Offsets = append(m.Offsets, &PostingOffset{})
			if err := m.Offsets[len(m.Offsets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field LastValOffset", wireType)
			}
			m.LastValOffset = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSparse
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.LastValOffset |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipSparse(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthSparse
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthSparse
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *PostingOffset) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowSparse
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: PostingOffset: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: PostingOffset: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSparse
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthSparse
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSparse
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Value = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field TableOff", wireType)
			}
			m.TableOff = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSparse
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.TableOff |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipSparse(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthSparse
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthSparse
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipSparse(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowSparse
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowSparse
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
			return iNdEx, nil
		case 1:
			iNdEx += 8
			return iNdEx, nil
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowSparse
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthSparse
			}
			iNdEx += length
			if iNdEx < 0 {
				return 0, ErrInvalidLengthSparse
			}
			return iNdEx, nil
		case 3:
			for {
				var innerWire uint64
				var start int = iNdEx
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return 0, ErrIntOverflowSparse
					}
					if iNdEx >= l {
						return 0, io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					innerWire |= (uint64(b) & 0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				innerWireType := int(innerWire & 0x7)
				if innerWireType == 4 {
					break
				}
				next, err := skipSparse(dAtA[start:])
				if err != nil {
					return 0, err
				}
				iNdEx = start + next
				if iNdEx < 0 {
					return 0, ErrInvalidLengthSparse
				}
			}
			return iNdEx, nil
		case 4:
			return iNdEx, nil
		case 5:
			iNdEx += 4
			return iNdEx, nil
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
	}
	panic("unreachable")
}

var (
	ErrInvalidLengthSparse = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSparse   = fmt.Errorf("proto: integer overflow")
)
