// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: parser/pbf/internal/osmpbf/fileformat.proto /* Package osmpbf is a generated protocol buffer package. It is generated from these files: parser/pbf/internal/osmpbf/fileformat.proto It has these top-level messages: Blob BlobHeader */ package osmpbf import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" import io "io" // 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Blob struct { Raw []byte `protobuf:"bytes,1,opt,name=raw" json:"raw"` RawSize int32 `protobuf:"varint,2,opt,name=raw_size,json=rawSize" json:"raw_size"` // Possible compressed versions of the data. ZlibData []byte `protobuf:"bytes,3,opt,name=zlib_data,json=zlibData" json:"zlib_data"` // PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED. LzmaData []byte `protobuf:"bytes,4,opt,name=lzma_data,json=lzmaData" json:"lzma_data"` // Formerly used for bzip2 compressed data. Depreciated in 2010. OBSOLETEBzip2Data []byte `protobuf:"bytes,5,opt,name=OBSOLETE_bzip2_data,json=OBSOLETEBzip2Data" json:"OBSOLETE_bzip2_data"` } func (m *Blob) Reset() { *m = Blob{} } func (m *Blob) String() string { return proto.CompactTextString(m) } func (*Blob) ProtoMessage() {} func (*Blob) Descriptor() ([]byte, []int) { return fileDescriptorFileformat, []int{0} } func (m *Blob) GetRaw() []byte { if m != nil { return m.Raw } return nil } func (m *Blob) GetRawSize() int32 { if m != nil { return m.RawSize } return 0 } func (m *Blob) GetZlibData() []byte { if m != nil { return m.ZlibData } return nil } func (m *Blob) GetLzmaData() []byte { if m != nil { return m.LzmaData } return nil } func (m *Blob) GetOBSOLETEBzip2Data() []byte { if m != nil { return m.OBSOLETEBzip2Data } return nil } type BlobHeader struct { Type string `protobuf:"bytes,1,req,name=type" json:"type"` Indexdata []byte `protobuf:"bytes,2,opt,name=indexdata" json:"indexdata"` Datasize int32 `protobuf:"varint,3,req,name=datasize" json:"datasize"` } func (m *BlobHeader) Reset() { *m = BlobHeader{} } func (m *BlobHeader) String() string { return proto.CompactTextString(m) } func (*BlobHeader) ProtoMessage() {} func (*BlobHeader) Descriptor() ([]byte, []int) { return fileDescriptorFileformat, []int{1} } func (m *BlobHeader) GetType() string { if m != nil { return m.Type } return "" } func (m *BlobHeader) GetIndexdata() []byte { if m != nil { return m.Indexdata } return nil } func (m *BlobHeader) GetDatasize() int32 { if m != nil { return m.Datasize } return 0 } func init() { proto.RegisterType((*Blob)(nil), "osmpbf.Blob") proto.RegisterType((*BlobHeader)(nil), "osmpbf.BlobHeader") } func (m *Blob) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Blob) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Raw != nil { dAtA[i] = 0xa i++ i = encodeVarintFileformat(dAtA, i, uint64(len(m.Raw))) i += copy(dAtA[i:], m.Raw) } dAtA[i] = 0x10 i++ i = encodeVarintFileformat(dAtA, i, uint64(m.RawSize)) if m.ZlibData != nil { dAtA[i] = 0x1a i++ i = encodeVarintFileformat(dAtA, i, uint64(len(m.ZlibData))) i += copy(dAtA[i:], m.ZlibData) } if m.LzmaData != nil { dAtA[i] = 0x22 i++ i = encodeVarintFileformat(dAtA, i, uint64(len(m.LzmaData))) i += copy(dAtA[i:], m.LzmaData) } if m.OBSOLETEBzip2Data != nil { dAtA[i] = 0x2a i++ i = encodeVarintFileformat(dAtA, i, uint64(len(m.OBSOLETEBzip2Data))) i += copy(dAtA[i:], m.OBSOLETEBzip2Data) } return i, nil } func (m *BlobHeader) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *BlobHeader) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintFileformat(dAtA, i, uint64(len(m.Type))) i += copy(dAtA[i:], m.Type) if m.Indexdata != nil { dAtA[i] = 0x12 i++ i = encodeVarintFileformat(dAtA, i, uint64(len(m.Indexdata))) i += copy(dAtA[i:], m.Indexdata) } dAtA[i] = 0x18 i++ i = encodeVarintFileformat(dAtA, i, uint64(m.Datasize)) return i, nil } func encodeVarintFileformat(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *Blob) Size() (n int) { var l int _ = l if m.Raw != nil { l = len(m.Raw) n += 1 + l + sovFileformat(uint64(l)) } n += 1 + sovFileformat(uint64(m.RawSize)) if m.ZlibData != nil { l = len(m.ZlibData) n += 1 + l + sovFileformat(uint64(l)) } if m.LzmaData != nil { l = len(m.LzmaData) n += 1 + l + sovFileformat(uint64(l)) } if m.OBSOLETEBzip2Data != nil { l = len(m.OBSOLETEBzip2Data) n += 1 + l + sovFileformat(uint64(l)) } return n } func (m *BlobHeader) Size() (n int) { var l int _ = l l = len(m.Type) n += 1 + l + sovFileformat(uint64(l)) if m.Indexdata != nil { l = len(m.Indexdata) n += 1 + l + sovFileformat(uint64(l)) } n += 1 + sovFileformat(uint64(m.Datasize)) return n } func sovFileformat(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozFileformat(x uint64) (n int) { return sovFileformat(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Blob) 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 ErrIntOverflowFileformat } 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: Blob: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Blob: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFileformat } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthFileformat } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...) if m.Raw == nil { m.Raw = []byte{} } iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RawSize", wireType) } m.RawSize = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFileformat } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.RawSize |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ZlibData", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFileformat } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthFileformat } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.ZlibData = append(m.ZlibData[:0], dAtA[iNdEx:postIndex]...) if m.ZlibData == nil { m.ZlibData = []byte{} } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LzmaData", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFileformat } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthFileformat } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.LzmaData = append(m.LzmaData[:0], dAtA[iNdEx:postIndex]...) if m.LzmaData == nil { m.LzmaData = []byte{} } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OBSOLETEBzip2Data", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFileformat } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthFileformat } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.OBSOLETEBzip2Data = append(m.OBSOLETEBzip2Data[:0], dAtA[iNdEx:postIndex]...) if m.OBSOLETEBzip2Data == nil { m.OBSOLETEBzip2Data = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFileformat(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthFileformat } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *BlobHeader) Unmarshal(dAtA []byte) error { var hasFields [1]uint64 l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFileformat } 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: BlobHeader: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: BlobHeader: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFileformat } 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 ErrInvalidLengthFileformat } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Type = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex hasFields[0] |= uint64(0x00000001) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Indexdata", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFileformat } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthFileformat } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.Indexdata = append(m.Indexdata[:0], dAtA[iNdEx:postIndex]...) if m.Indexdata == nil { m.Indexdata = []byte{} } iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Datasize", wireType) } m.Datasize = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFileformat } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Datasize |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } hasFields[0] |= uint64(0x00000002) default: iNdEx = preIndex skippy, err := skipFileformat(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthFileformat } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return proto.NewRequiredNotSetError("type") } if hasFields[0]&uint64(0x00000002) == 0 { return proto.NewRequiredNotSetError("datasize") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipFileformat(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, ErrIntOverflowFileformat } 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, ErrIntOverflowFileformat } 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, ErrIntOverflowFileformat } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthFileformat } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowFileformat } 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 := skipFileformat(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } 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 ( ErrInvalidLengthFileformat = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowFileformat = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("parser/pbf/internal/osmpbf/fileformat.proto", fileDescriptorFileformat) } var fileDescriptorFileformat = []byte{ // 294 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8f, 0xb1, 0x6a, 0xeb, 0x30, 0x14, 0x86, 0x23, 0xdb, 0xc9, 0x4d, 0x0e, 0xb7, 0x43, 0x55, 0x28, 0x9a, 0x1c, 0x27, 0x53, 0xa0, 0x90, 0x40, 0x87, 0x3e, 0x80, 0x69, 0x20, 0x43, 0x21, 0x90, 0x74, 0x0f, 0x47, 0x8d, 0x0c, 0x02, 0xd9, 0x32, 0xb2, 0xc0, 0xb5, 0x9f, 0xa2, 0x2f, 0xd4, 0x3d, 0x63, 0x9f, 0xa0, 0x14, 0xf7, 0x45, 0x8a, 0xec, 0x34, 0xf5, 0x24, 0xf4, 0x9d, 0xef, 0x48, 0xff, 0x0f, 0x77, 0x39, 0x9a, 0x42, 0x98, 0x55, 0xce, 0x93, 0x95, 0xcc, 0xac, 0x30, 0x19, 0xaa, 0x95, 0x2e, 0x52, 0x77, 0x4f, 0xa4, 0x12, 0x89, 0x36, 0x29, 0xda, 0x65, 0x6e, 0xb4, 0xd5, 0x74, 0xd4, 0x0d, 0xe6, 0xef, 0x04, 0x82, 0x58, 0x69, 0x4e, 0x6f, 0xc1, 0x37, 0x58, 0x32, 0x12, 0x91, 0xc5, 0xff, 0x38, 0x38, 0x7d, 0x4e, 0x07, 0x3b, 0x07, 0xe8, 0x14, 0xc6, 0x06, 0xcb, 0x43, 0x21, 0x6b, 0xc1, 0xbc, 0x88, 0x2c, 0x86, 0xe7, 0xe1, 0x3f, 0x83, 0xe5, 0x5e, 0xd6, 0x82, 0xce, 0x60, 0x52, 0x2b, 0xc9, 0x0f, 0x47, 0xb4, 0xc8, 0xfc, 0xde, 0xfa, 0xd8, 0xe1, 0x47, 0xb4, 0xe8, 0x14, 0x55, 0xa7, 0xd8, 0x29, 0x41, 0x5f, 0x71, 0xb8, 0x55, 0x1e, 0xe0, 0x66, 0x1b, 0xef, 0xb7, 0x4f, 0xeb, 0xe7, 0xf5, 0x81, 0xd7, 0x32, 0xbf, 0xef, 0xe4, 0x61, 0x2b, 0x8f, 0x9c, 0xcc, 0xc8, 0xee, 0xfa, 0x57, 0x89, 0x9d, 0xe1, 0xf6, 0xe6, 0x0a, 0xc0, 0xc5, 0xdf, 0x08, 0x3c, 0x0a, 0x43, 0x19, 0x04, 0xb6, 0xca, 0x05, 0x23, 0x91, 0xb7, 0x98, 0x9c, 0xff, 0x68, 0x09, 0x9d, 0xc3, 0x44, 0x66, 0x47, 0xf1, 0xda, 0xbe, 0xea, 0xf5, 0x22, 0xfc, 0x61, 0x1a, 0xc1, 0xd8, 0x9d, 0x6d, 0x55, 0x3f, 0xf2, 0x2e, 0x55, 0x2f, 0x34, 0x9e, 0x9d, 0x9a, 0x90, 0x7c, 0x34, 0x21, 0xf9, 0x6a, 0x42, 0xf2, 0xf6, 0x1d, 0x0e, 0xe0, 0xea, 0xc5, 0xe8, 0x82, 0x57, 0x4b, 0x2e, 0x33, 0x34, 0xd5, 0xc6, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xac, 0xea, 0xf3, 0xa9, 0x86, 0x01, 0x00, 0x00, }