// 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"`
	PostingOffsetInMemorySampling int64                           `protobuf:"varint,2,opt,name=postingOffsetInMemorySampling,proto3" json:"postingOffsetInMemorySampling,omitempty"`
}

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
}

func (m *PostingOffsetTable) GetPostingOffsetInMemorySampling() int64 {
	if m != nil {
		return m.PostingOffsetInMemorySampling
	}
	return 0
}

// 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{
	// 415 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xc1, 0xae, 0xd2, 0x40,
	0x14, 0xed, 0xb4, 0x11, 0xf0, 0x02, 0x09, 0x19, 0x88, 0x21, 0x04, 0x27, 0xda, 0xb8, 0x60, 0x05,
	0x06, 0x13, 0x43, 0xdc, 0x09, 0xba, 0x30, 0xc4, 0x60, 0x5a, 0xc3, 0xc2, 0x8d, 0x69, 0xc3, 0xb4,
	0x12, 0x4b, 0xa7, 0xe9, 0x14, 0x63, 0x77, 0x2e, 0xdd, 0xe9, 0x67, 0xf8, 0x29, 0x2e, 0x59, 0xb2,
	0x7c, 0x94, 0xcd, 0x5b, 0xf2, 0x09, 0x2f, 0x9d, 0x69, 0x79, 0xf4, 0x3d, 0xc2, 0xdb, 0xcd, 0xdc,
	0x7b, 0xce, 0x3d, 0xe7, 0x9e, 0x19, 0xa8, 0xf1, 0xc0, 0x0a, 0x39, 0xed, 0x07, 0x21, 0x8b, 0x18,
	0xae, 0x2f, 0xfd, 0x05, 0xfd, 0xf9, 0x8d, 0x5a, 0x0b, 0x1a, 0x06, 0x76, 0xa7, 0xe5, 0x32, 0x97,
	0x89, 0xce, 0x20, 0x3d, 0x49, 0x90, 0xfe, 0x07, 0x41, 0xc9, 0x14, 0x2c, 0xfc, 0x12, 0xca, 0x3c,
	0x5e, 0xd9, 0xcc, 0xe3, 0x6d, 0xf4, 0x0c, 0xf5, 0xaa, 0xc3, 0x27, 0xfd, 0xc2, 0x84, 0xbe, 0x29,
	0xbb, 0x46, 0x0e, 0xc3, 0x26, 0x34, 0x03, 0xc6, 0xa3, 0xa5, 0xef, 0xf2, 0x99, 0xe3, 0x70, 0x1a,
	0x7d, 0xb6, 0x6c, 0x8f, 0xb6, 0x55, 0xc1, 0x7e, 0x7e, 0x87, 0xfd, 0x49, 0x22, 0x4f, 0x80, 0xc6,
	0x39, 0xb6, 0x3e, 0x85, 0x72, 0x26, 0x84, 0xbb, 0x50, 0x66, 0xa2, 0x93, 0x3a, 0xd2, 0x7a, 0xda,
	0x58, 0x6d, 0x20, 0x23, 0x2f, 0x61, 0x1d, 0x6a, 0x99, 0x91, 0x09, 0x5b, 0xfb, 0x91, 0x90, 0xd5,
	0x8c, 0x42, 0x4d, 0xff, 0xad, 0x02, 0xbe, 0x2f, 0x8c, 0xa7, 0x50, 0xc9, 0xa5, 0xc5, 0xe4, 0xea,
	0x70, 0xf0, 0xa0, 0xdb, 0xbc, 0xc4, 0xdf, 0xfb, 0x51, 0x18, 0x1b, 0xc7, 0x01, 0xf8, 0x1d, 0x3c,
	0x0d, 0x4e, 0xd1, 0x1f, 0xfc, 0x8f, 0x74, 0xc5, 0xc2, 0xd8, 0xb4, 0x56, 0x81, 0xb7, 0xf4, 0xdd,
	0xcc, 0xd8, 0x65, 0x50, 0xe7, 0x2b, 0xd4, 0x0b, 0x02, 0xb8, 0x01, 0xda, 0x77, 0x1a, 0x8b, 0xa7,
	0x78, 0x6c, 0xa4, 0x47, 0x3c, 0x82, 0x47, 0x3f, 0x2c, 0x6f, 0x9d, 0x07, 0xac, 0x9f, 0xb7, 0x3c,
	0x4f, 0x21, 0x52, 0x84, 0x1b, 0x92, 0xf0, 0x46, 0x1d, 0x21, 0x9d, 0x43, 0xf3, 0x0c, 0x02, 0xbf,
	0x2e, 0x66, 0x5c, 0x1d, 0x76, 0x2f, 0x25, 0x71, 0x9b, 0xfe, 0x0b, 0xa8, 0x7b, 0x16, 0x8f, 0xe6,
	0x96, 0x27, 0x3b, 0xd9, 0x96, 0xc5, 0xa2, 0xfe, 0xf6, 0xb8, 0x95, 0x2c, 0xe0, 0x56, 0xbe, 0x83,
	0xdc, 0x4b, 0x5e, 0x70, 0x07, 0x2a, 0x51, 0x9a, 0xf1, 0xcc, 0x71, 0xb2, 0x39, 0xc7, 0xfb, 0x78,
	0xb2, 0xd9, 0x11, 0x65, 0xbb, 0x23, 0xca, 0x61, 0x47, 0xd0, 0xaf, 0x84, 0xa0, 0x7f, 0x09, 0x41,
	0xff, 0x13, 0x82, 0x36, 0x09, 0x41, 0x57, 0x09, 0x41, 0xd7, 0x09, 0x51, 0x0e, 0x09, 0x41, 0x7f,
	0xf7, 0x44, 0xd9, 0xec, 0x89, 0xb2, 0xdd, 0x13, 0xe5, 0x4b, 0xf1, 0xf3, 0xdb, 0x25, 0xf1, 0xdb,
	0x5f, 0xdd, 0x04, 0x00, 0x00, 0xff, 0xff, 0xba, 0x5f, 0x0c, 0xa5, 0x22, 0x03, 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
		}
	}
	if this.PostingOffsetInMemorySampling != that1.PostingOffsetInMemorySampling {
		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, 6)
	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, "PostingOffsetInMemorySampling: "+fmt.Sprintf("%#v", this.PostingOffsetInMemorySampling)+",\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 m.PostingOffsetInMemorySampling != 0 {
		i = encodeVarintSparse(dAtA, i, uint64(m.PostingOffsetInMemorySampling))
		i--
		dAtA[i] = 0x10
	}
	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))
		}
	}
	if m.PostingOffsetInMemorySampling != 0 {
		n += 1 + sovSparse(uint64(m.PostingOffsetInMemorySampling))
	}
	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 + `,`,
		`PostingOffsetInMemorySampling:` + fmt.Sprintf("%v", this.PostingOffsetInMemorySampling) + `,`,
		`}`,
	}, "")
	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) || (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) || (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) || (iNdEx+skippy) < 0 {
						return ErrInvalidLengthSparse
					}
					if (iNdEx + skippy) > postIndex {
						return io.ErrUnexpectedEOF
					}
					iNdEx += skippy
				}
			}
			m.Postings[mapkey] = mapvalue
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field PostingOffsetInMemorySampling", wireType)
			}
			m.PostingOffsetInMemorySampling = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSparse
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.PostingOffsetInMemorySampling |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipSparse(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (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) || (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) || (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
	depth := 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
				}
			}
		case 1:
			iNdEx += 8
		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
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupSparse
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthSparse
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthSparse        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSparse          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSparse = fmt.Errorf("proto: unexpected end of group")
)
