class WireFormatLite

Defined at line 65 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

This class is for internal use by the protocol buffer library and by

protocol-compiler-generated message classes. It must not be called

directly by clients.

This class contains helpers for implementing the binary protocol buffer

wire format without the need for reflection. Use WireFormat when using

reflection.

This class is really a namespace that contains only static methods.

Public Members

static const int kTagTypeBits
static const uint32_t kTagTypeMask
static const int kMessageSetItemNumber
static const int kMessageSetTypeIdNumber
static const int kMessageSetMessageNumber
static const int kMessageSetItemStartTag
static const int kMessageSetItemEndTag
static const int kMessageSetTypeIdTag
static const int kMessageSetMessageTag
static const size_t kMessageSetItemTagsSize
static const size_t kFixed32Size
static const size_t kFixed64Size
static const size_t kSFixed32Size
static const size_t kSFixed64Size
static const size_t kFloatSize
static const size_t kDoubleSize
static const size_t kBoolSize

Public Methods

size_t Int64SizeWithPackedTagSize (const RepeatedField<int64_t> & value, size_t tag_size, const internal::CachedSize & cached_size)
template <typename MessageType>
bool ReadMessageNoVirtual (io::CodedInputStream * input, MessageType * value)

Defined at line 337 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

bool SkipMessage (io::CodedInputStream * input, io::CodedOutputStream * output)

Reads and ignores a message from the input. Skipped values are recorded

to a CodedOutputStream.

void WireFormatLite ()

Defined at line 67 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <typename T>
CppType CppTypeFor ()

Defined at line 135 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

WireFormatLite::WireType WireTypeForFieldType (WireFormatLite::FieldType type)

Given a FieldDescriptor::Type return its WireType

Defined at line 169 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <int field_number>
uint8_t * WriteInt32ToArrayWithField (::google::protobuf::io::EpsCopyOutputStream * stream, int32_t value, uint8_t * target)

Write fields, including tags.

Defined at line 492 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <int field_number>
uint8_t * WriteInt64ToArrayWithField (::google::protobuf::io::EpsCopyOutputStream * stream, int64_t value, uint8_t * target)

Defined at line 500 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <int field_number>
uint8_t * WriteEnumToArrayWithField (::google::protobuf::io::EpsCopyOutputStream * stream, int value, uint8_t * target)

Defined at line 508 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

CppType FieldTypeToCppType (FieldType type)

Helper method to get the CppType for a particular Type.

Defined at line 747 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint32_t MakeTag (int field_number, WireType type)

Helper functions for encoding and decoding tags. (Inlined below and in

_inl.h)

This is different from MakeTag(field->number(), field->type()) in the

case of packed repeated fields.

Defined at line 752 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

WireType GetTagWireType (uint32_t tag)

Defined at line 757 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

int GetTagFieldNumber (uint32_t tag)

Defined at line 761 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t TagSize (int field_number, WireFormatLite::FieldType type)

Compute the byte size of a tag. For groups, this includes both the start

and end tags.

Defined at line 765 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPrimitive<int, google::protobuf::internal::WireFormatLite::TYPE_INT32> (io::CodedInputStream * input, int32_t * value)

Implementation details of ReadPrimitive.

Defined at line 861 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPrimitive<long, google::protobuf::internal::WireFormatLite::TYPE_INT64> (io::CodedInputStream * input, int64_t * value)

Defined at line 869 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPrimitive<unsigned int, google::protobuf::internal::WireFormatLite::TYPE_UINT32> (io::CodedInputStream * input, uint32_t * value)

Defined at line 877 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPrimitive<unsigned long, google::protobuf::internal::WireFormatLite::TYPE_UINT64> (io::CodedInputStream * input, uint64_t * value)

Defined at line 883 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPrimitive<int, google::protobuf::internal::WireFormatLite::TYPE_SINT32> (io::CodedInputStream * input, int32_t * value)

Defined at line 889 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPrimitive<long, google::protobuf::internal::WireFormatLite::TYPE_SINT64> (io::CodedInputStream * input, int64_t * value)

Defined at line 897 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPrimitive<unsigned int, google::protobuf::internal::WireFormatLite::TYPE_FIXED32> (io::CodedInputStream * input, uint32_t * value)

Defined at line 905 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPrimitive<unsigned long, google::protobuf::internal::WireFormatLite::TYPE_FIXED64> (io::CodedInputStream * input, uint64_t * value)

Defined at line 911 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPrimitive<int, google::protobuf::internal::WireFormatLite::TYPE_SFIXED32> (io::CodedInputStream * input, int32_t * value)

Defined at line 917 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPrimitive<long, google::protobuf::internal::WireFormatLite::TYPE_SFIXED64> (io::CodedInputStream * input, int64_t * value)

Defined at line 926 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPrimitive<float, google::protobuf::internal::WireFormatLite::TYPE_FLOAT> (io::CodedInputStream * input, float * value)

Defined at line 935 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPrimitive<double, google::protobuf::internal::WireFormatLite::TYPE_DOUBLE> (io::CodedInputStream * input, double * value)

Defined at line 943 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPrimitive<bool, google::protobuf::internal::WireFormatLite::TYPE_BOOL> (io::CodedInputStream * input, bool * value)

Defined at line 951 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPrimitive<int, google::protobuf::internal::WireFormatLite::TYPE_ENUM> (io::CodedInputStream * input, int * value)

Defined at line 959 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
const uint8_t * ReadPrimitiveFromArray<unsigned int, google::protobuf::internal::WireFormatLite::TYPE_FIXED32> (const uint8_t * buffer, uint32_t * value)

Defined at line 968 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
const uint8_t * ReadPrimitiveFromArray<unsigned long, google::protobuf::internal::WireFormatLite::TYPE_FIXED64> (const uint8_t * buffer, uint64_t * value)

Defined at line 974 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
const uint8_t * ReadPrimitiveFromArray<int, google::protobuf::internal::WireFormatLite::TYPE_SFIXED32> (const uint8_t * buffer, int32_t * value)

Defined at line 980 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
const uint8_t * ReadPrimitiveFromArray<long, google::protobuf::internal::WireFormatLite::TYPE_SFIXED64> (const uint8_t * buffer, int64_t * value)

Defined at line 989 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
const uint8_t * ReadPrimitiveFromArray<float, google::protobuf::internal::WireFormatLite::TYPE_FLOAT> (const uint8_t * buffer, float * value)

Defined at line 998 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
const uint8_t * ReadPrimitiveFromArray<double, google::protobuf::internal::WireFormatLite::TYPE_DOUBLE> (const uint8_t * buffer, double * value)

Defined at line 1007 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadRepeatedPrimitive<unsigned int, google::protobuf::internal::WireFormatLite::TYPE_FIXED32> (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<uint32_t> * values)

Defined at line 1092 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadRepeatedPrimitive<unsigned long, google::protobuf::internal::WireFormatLite::TYPE_FIXED64> (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<uint64_t> * values)

Defined at line 1093 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadRepeatedPrimitive<int, google::protobuf::internal::WireFormatLite::TYPE_SFIXED32> (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<int32_t> * values)

Defined at line 1094 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadRepeatedPrimitive<long, google::protobuf::internal::WireFormatLite::TYPE_SFIXED64> (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<int64_t> * values)

Defined at line 1095 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadRepeatedPrimitive<float, google::protobuf::internal::WireFormatLite::TYPE_FLOAT> (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<float> * values)

Defined at line 1096 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadRepeatedPrimitive<double, google::protobuf::internal::WireFormatLite::TYPE_DOUBLE> (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<double> * values)

Defined at line 1097 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPackedPrimitive<unsigned int, google::protobuf::internal::WireFormatLite::TYPE_FIXED32> (io::CodedInputStream * input, RepeatedField<uint32_t> * values)

Defined at line 1188 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPackedPrimitive<unsigned long, google::protobuf::internal::WireFormatLite::TYPE_FIXED64> (io::CodedInputStream * input, RepeatedField<uint64_t> * values)

Defined at line 1189 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPackedPrimitive<int, google::protobuf::internal::WireFormatLite::TYPE_SFIXED32> (io::CodedInputStream * input, RepeatedField<int32_t> * values)

Defined at line 1190 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPackedPrimitive<long, google::protobuf::internal::WireFormatLite::TYPE_SFIXED64> (io::CodedInputStream * input, RepeatedField<int64_t> * values)

Defined at line 1191 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPackedPrimitive<float, google::protobuf::internal::WireFormatLite::TYPE_FLOAT> (io::CodedInputStream * input, RepeatedField<float> * values)

Defined at line 1192 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <>
bool ReadPackedPrimitive<double, google::protobuf::internal::WireFormatLite::TYPE_DOUBLE> (io::CodedInputStream * input, RepeatedField<double> * values)

Defined at line 1193 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

bool SkipField (io::CodedInputStream * input, uint32_t tag)

Skips a field value with the given tag. The input should start

positioned immediately after the tag. Skipped values are simply

discarded, not recorded anywhere. See WireFormat::SkipField() for a

version that records to an UnknownFieldSet.

bool SkipField (io::CodedInputStream * input, uint32_t tag, io::CodedOutputStream * output)

Skips a field value with the given tag. The input should start

positioned immediately after the tag. Skipped values are recorded to a

CodedOutputStream.

bool SkipMessage (io::CodedInputStream * input)

Reads and ignores a message from the input. Skipped values are simply

discarded, not recorded anywhere. See WireFormat::SkipMessage() for a

version that records to an UnknownFieldSet.

uint32_t EncodeFloat (float value)

Helper functions for converting between floats/doubles and IEEE-754

uint32s/uint64s so that they can be written. (Assumes your platform

uses IEEE-754 floats.)

Defined at line 777 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

float DecodeFloat (uint32_t value)

Defined at line 781 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint64_t EncodeDouble (double value)

Defined at line 785 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

double DecodeDouble (uint64_t value)

Defined at line 789 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint32_t ZigZagEncode32 (int32_t n)

Helper functions for mapping signed integers to unsigned integers in

such a way that numbers with small magnitudes will encode to smaller

varints. If you simply static_cast a negative number to an unsigned

number and varint-encode it, it will always take 10 bytes, defeating

the purpose of varint. So, for the "sint32" and "sint64" field types,

we ZigZag-encode the values.

Defined at line 817 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

int32_t ZigZagDecode32 (uint32_t n)

Defined at line 823 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint64_t ZigZagEncode64 (int64_t n)

Defined at line 828 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

int64_t ZigZagDecode64 (uint64_t n)

Defined at line 834 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <typename CType, enum FieldType DeclaredType>
bool ReadPrimitive (io::CodedInputStream * input, CType * value)

For primitive fields, we just use a templatized routine parameterized by

the represented type and the FieldType. These are specialized with the

appropriate definition for each declared type.

template <typename CType, enum FieldType DeclaredType>
bool ReadRepeatedPrimitive (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<CType> * value)

Reads repeated primitive values, with optimizations for repeats.

tag_size and tag should both be compile-time constants provided by the

protocol compiler.

Defined at line 1018 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <typename CType, enum FieldType DeclaredType>
const uint8_t * ReadPrimitiveFromArray (const uint8_t * buffer, CType * value)

Reads a primitive value directly from the provided buffer. It returns a

pointer past the segment of data that was read.

This is only implemented for the types with fixed wire size, e.g.

float, double, and the (s)fixed* types.

template <typename CType, enum FieldType DeclaredType>
bool ReadPackedPrimitive (io::CodedInputStream * input, RepeatedField<CType> * value)

Reads a primitive packed field.

This is only implemented for packable types.

Defined at line 1102 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

bool ReadString (io::CodedInputStream * input, std::string * value)

Read a string. ReadString(..., std::string* value) requires an

existing std::string.

Defined at line 842 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

bool ReadBytes (io::CodedInputStream * input, std::string * value)

Analogous to ReadString().

bool ReadBytes (io::CodedInputStream * input, absl::Cord * value)

Defined at line 1197 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

bool VerifyUtf8String (const char * data, int size, Operation op, absl::string_view field_name)

Returns true if the data is valid UTF-8.

template <typename MessageType>
bool ReadGroup (int field_number, io::CodedInputStream * input, MessageType * value)

Defined at line 1205 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <typename MessageType>
bool ReadMessage (io::CodedInputStream * input, MessageType * value)

Defined at line 1218 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteTag (int field_number, WireType type, io::CodedOutputStream * output)

Write a tag. The Write*() functions typically include the tag, so

normally there's no need to call this unless using the Write*NoTag()

variants.

Defined at line 1232 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteInt32NoTag (int32_t value, io::CodedOutputStream * output)

Write fields, without tags.

Defined at line 1237 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteInt64NoTag (int64_t value, io::CodedOutputStream * output)

Defined at line 1241 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteUInt32NoTag (uint32_t value, io::CodedOutputStream * output)

Defined at line 1245 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteUInt64NoTag (uint64_t value, io::CodedOutputStream * output)

Defined at line 1249 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteSInt32NoTag (int32_t value, io::CodedOutputStream * output)

Defined at line 1253 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteSInt64NoTag (int64_t value, io::CodedOutputStream * output)

Defined at line 1257 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteFixed32NoTag (uint32_t value, io::CodedOutputStream * output)

Defined at line 1261 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteFixed64NoTag (uint64_t value, io::CodedOutputStream * output)

Defined at line 1265 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteSFixed32NoTag (int32_t value, io::CodedOutputStream * output)

Defined at line 1269 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteSFixed64NoTag (int64_t value, io::CodedOutputStream * output)

Defined at line 1273 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteFloatNoTag (float value, io::CodedOutputStream * output)

Defined at line 1277 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteDoubleNoTag (double value, io::CodedOutputStream * output)

Defined at line 1281 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteBoolNoTag (bool value, io::CodedOutputStream * output)

Defined at line 1285 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteEnumNoTag (int value, io::CodedOutputStream * output)

Defined at line 1289 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

void WriteFloatArray (const float * a, int n, io::CodedOutputStream * output)

Write array of primitive fields, without tags

void WriteDoubleArray (const double * a, int n, io::CodedOutputStream * output)
void WriteFixed32Array (const uint32_t * a, int n, io::CodedOutputStream * output)
void WriteFixed64Array (const uint64_t * a, int n, io::CodedOutputStream * output)
void WriteSFixed32Array (const int32_t * a, int n, io::CodedOutputStream * output)
void WriteSFixed64Array (const int64_t * a, int n, io::CodedOutputStream * output)
void WriteBoolArray (const bool * a, int n, io::CodedOutputStream * output)
void WriteInt32 (int field_number, int32_t value, io::CodedOutputStream * output)

Write fields, including tags.

void WriteInt64 (int field_number, int64_t value, io::CodedOutputStream * output)
void WriteUInt32 (int field_number, uint32_t value, io::CodedOutputStream * output)
void WriteUInt64 (int field_number, uint64_t value, io::CodedOutputStream * output)
void WriteSInt32 (int field_number, int32_t value, io::CodedOutputStream * output)
void WriteSInt64 (int field_number, int64_t value, io::CodedOutputStream * output)
void WriteFixed32 (int field_number, uint32_t value, io::CodedOutputStream * output)
void WriteFixed64 (int field_number, uint64_t value, io::CodedOutputStream * output)
void WriteSFixed32 (int field_number, int32_t value, io::CodedOutputStream * output)
void WriteSFixed64 (int field_number, int64_t value, io::CodedOutputStream * output)
void WriteFloat (int field_number, float value, io::CodedOutputStream * output)
void WriteDouble (int field_number, double value, io::CodedOutputStream * output)
void WriteBool (int field_number, bool value, io::CodedOutputStream * output)
void WriteEnum (int field_number, int value, io::CodedOutputStream * output)
void WriteString (int field_number, const std::string & value, io::CodedOutputStream * output)
void WriteBytes (int field_number, const std::string & value, io::CodedOutputStream * output)
void WriteStringMaybeAliased (int field_number, const std::string & value, io::CodedOutputStream * output)
void WriteBytesMaybeAliased (int field_number, const std::string & value, io::CodedOutputStream * output)
void WriteGroup (int field_number, const MessageLite & value, io::CodedOutputStream * output)
void WriteMessage (int field_number, const MessageLite & value, io::CodedOutputStream * output)
void WriteGroupMaybeToArray (int field_number, const MessageLite & value, io::CodedOutputStream * output)

Like above, but these will check if the output stream has enough

space to write directly to a flat array.

void WriteMessageMaybeToArray (int field_number, const MessageLite & value, io::CodedOutputStream * output)
uint8_t * WriteTagToArray (int field_number, WireType type, uint8_t * target)

Like above, but use only *ToArray methods of CodedOutputStream.

Defined at line 1296 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteInt32NoTagToArray (int32_t value, uint8_t * target)

Write fields, without tags.

Defined at line 1302 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteInt64NoTagToArray (int64_t value, uint8_t * target)

Defined at line 1306 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteUInt32NoTagToArray (uint32_t value, uint8_t * target)

Defined at line 1311 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteUInt64NoTagToArray (uint64_t value, uint8_t * target)

Defined at line 1315 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteSInt32NoTagToArray (int32_t value, uint8_t * target)

Defined at line 1319 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteSInt64NoTagToArray (int64_t value, uint8_t * target)

Defined at line 1324 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteFixed32NoTagToArray (uint32_t value, uint8_t * target)

Defined at line 1329 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteFixed64NoTagToArray (uint64_t value, uint8_t * target)

Defined at line 1333 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteSFixed32NoTagToArray (int32_t value, uint8_t * target)

Defined at line 1337 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteSFixed64NoTagToArray (int64_t value, uint8_t * target)

Defined at line 1342 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteFloatNoTagToArray (float value, uint8_t * target)

Defined at line 1347 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteDoubleNoTagToArray (double value, uint8_t * target)

Defined at line 1352 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteBoolNoTagToArray (bool value, uint8_t * target)

Defined at line 1357 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteEnumNoTagToArray (int value, uint8_t * target)

Defined at line 1361 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <typename T>
uint8_t * WritePrimitiveNoTagToArray (const RepeatedField<T> & value, uint8_t *(*)(T, uint8_t *) Writer, uint8_t * target)

Write fields, without tags. These require that value.size() > 0.

Defined at line 1367 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <typename T>
uint8_t * WriteFixedNoTagToArray (const RepeatedField<T> & value, uint8_t *(*)(T, uint8_t *) Writer, uint8_t * target)

Defined at line 1383 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteInt32ToArray (int field_number, int32_t value, uint8_t * target)

Defined at line 1401 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteInt64ToArray (int field_number, int64_t value, uint8_t * target)

Defined at line 1407 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteUInt32ToArray (int field_number, uint32_t value, uint8_t * target)

Defined at line 1413 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteUInt64ToArray (int field_number, uint64_t value, uint8_t * target)

Defined at line 1419 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteSInt32ToArray (int field_number, int32_t value, uint8_t * target)

Defined at line 1425 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteSInt64ToArray (int field_number, int64_t value, uint8_t * target)

Defined at line 1431 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteFixed32ToArray (int field_number, uint32_t value, uint8_t * target)

Defined at line 1437 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteFixed64ToArray (int field_number, uint64_t value, uint8_t * target)

Defined at line 1443 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteSFixed32ToArray (int field_number, int32_t value, uint8_t * target)

Defined at line 1449 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteSFixed64ToArray (int field_number, int64_t value, uint8_t * target)

Defined at line 1455 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteFloatToArray (int field_number, float value, uint8_t * target)

Defined at line 1461 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteDoubleToArray (int field_number, double value, uint8_t * target)

Defined at line 1466 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteBoolToArray (int field_number, bool value, uint8_t * target)

Defined at line 1472 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteEnumToArray (int field_number, int value, uint8_t * target)

Defined at line 1477 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <typename T>
uint8_t * WritePrimitiveToArray (int field_number, const RepeatedField<T> & value, uint8_t *(*)(int, T, uint8_t *) Writer, uint8_t * target)

Defined at line 1484 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteStringToArray (int field_number, const std::string & value, uint8_t * target)

Defined at line 1501 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * WriteBytesToArray (int field_number, const std::string & value, uint8_t * target)

Defined at line 1511 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

uint8_t * InternalWriteGroup (int field_number, const MessageLite & value, uint8_t * target, io::EpsCopyOutputStream * stream)

Whether to serialize deterministically (e.g., map keys are

sorted) is a property of a CodedOutputStream, and in the process

of serialization, the "ToArray" variants may be invoked. But they don't

have a CodedOutputStream available, so they get an additional parameter

telling them whether to serialize deterministically.

uint8_t * InternalWriteMessage (int field_number, const MessageLite & value, int cached_size, uint8_t * target, io::EpsCopyOutputStream * stream)
template <typename MessageType>
uint8_t * InternalWriteGroupNoVirtualToArray (int field_number, const MessageType & value, uint8_t * target)

Like above, but de-virtualize the call to SerializeWithCachedSizes().

Defined at line 1522 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <typename MessageType>
uint8_t * InternalWriteMessageNoVirtualToArray (int field_number, const MessageType & value, uint8_t * target)

Defined at line 1531 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t Int32Size (int32_t value)

Compute the byte size of a field. The XxSize() functions do NOT include

the tag, so you must also call TagSize(). (This is because, for repeated

fields, you should only call TagSize() once and multiply it by the element

count, but you may have to call XxSize() for each individual element.)

Defined at line 1546 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t Int64Size (int64_t value)

Defined at line 1549 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t UInt32Size (uint32_t value)

Defined at line 1552 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t UInt64Size (uint64_t value)

Defined at line 1555 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t SInt32Size (int32_t value)

Defined at line 1558 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t SInt64Size (int64_t value)

Defined at line 1561 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t EnumSize (int value)

Defined at line 1564 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t Int32SizePlusOne (int32_t value)

Defined at line 1567 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t Int64SizePlusOne (int64_t value)

Defined at line 1570 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t UInt32SizePlusOne (uint32_t value)

Defined at line 1574 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t UInt64SizePlusOne (uint64_t value)

Defined at line 1577 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t SInt32SizePlusOne (int32_t value)

Defined at line 1580 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t SInt64SizePlusOne (int64_t value)

Defined at line 1583 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t EnumSizePlusOne (int value)

Defined at line 1586 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t Int32Size (const RepeatedField<int32_t> & value)
size_t Int64Size (const RepeatedField<int64_t> & value)
size_t UInt32Size (const RepeatedField<uint32_t> & value)
size_t UInt64Size (const RepeatedField<uint64_t> & value)
size_t SInt32Size (const RepeatedField<int32_t> & value)
size_t SInt64Size (const RepeatedField<int64_t> & value)
size_t EnumSize (const RepeatedField<int> & value)
size_t Int32SizeWithPackedTagSize (const RepeatedField<int32_t> & value, size_t tag_size, const internal::CachedSize & cached_size)
size_t UInt32SizeWithPackedTagSize (const RepeatedField<uint32_t> & value, size_t tag_size, const internal::CachedSize & cached_size)
size_t UInt64SizeWithPackedTagSize (const RepeatedField<uint64_t> & value, size_t tag_size, const internal::CachedSize & cached_size)
size_t SInt32SizeWithPackedTagSize (const RepeatedField<int32_t> & value, size_t tag_size, const internal::CachedSize & cached_size)
size_t SInt64SizeWithPackedTagSize (const RepeatedField<int64_t> & value, size_t tag_size, const internal::CachedSize & cached_size)
size_t EnumSizeWithPackedTagSize (const RepeatedField<int> & value, size_t tag_size, const internal::CachedSize & cached_size)
size_t StringSize (const std::string & value)

Defined at line 1590 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t StringSize (const absl::Cord & value)

Defined at line 1601 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t BytesSize (const std::string & value)

Defined at line 1593 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t BytesSize (const absl::Cord & value)

Defined at line 1597 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t StringSize (absl::string_view value)

Defined at line 1605 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t BytesSize (absl::string_view value)

Defined at line 1611 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <typename MessageType>
size_t GroupSize (const MessageType & value)

Defined at line 1616 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

template <typename MessageType>
size_t MessageSize (const MessageType & value)

Defined at line 1620 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

size_t LengthDelimitedSize (size_t length)

Given the length of data, calculate the byte size of the data on the

wire if we encode the data as a length delimited field.

Defined at line 1624 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

Enumerations

enum WireType : int
Name Value
WIRETYPE_VARINT 0
WIRETYPE_FIXED64 1
WIRETYPE_LENGTH_DELIMITED 2
WIRETYPE_START_GROUP 3
WIRETYPE_END_GROUP 4
WIRETYPE_FIXED32 5

The wire format is composed of a sequence of tag/value pairs, each

of which contains the value of one field (or one element of a repeated

field). Each tag is encoded as a varint. The lower bits of the tag

identify its wire type, which specifies the format of the data to follow.

The rest of the bits contain the field number. Each type of field (as

declared by FieldDescriptor::Type, in descriptor.h) maps to one of

these wire types. Immediately following each tag is the field's value,

encoded in the format specified by the wire type. Because the tag

identifies the encoding of this data, it is possible to skip

unrecognized fields for forwards compatibility.

Defined at line 83 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

enum FieldType
Name Value
TYPE_DOUBLE 1
TYPE_FLOAT 2
TYPE_INT64 3
TYPE_UINT64 4
TYPE_INT32 5
TYPE_FIXED64 6
TYPE_FIXED32 7
TYPE_BOOL 8
TYPE_STRING 9
TYPE_GROUP 10
TYPE_MESSAGE 11
TYPE_BYTES 12
TYPE_UINT32 13
TYPE_ENUM 14
TYPE_SFIXED32 15
TYPE_SFIXED64 16
TYPE_SINT32 17
TYPE_SINT64 18
MAX_FIELD_TYPE 18

Lite alternative to FieldDescriptor::Type. Must be kept in sync.

Defined at line 97 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

enum CppType
Name Value
CPPTYPE_INT32 1
CPPTYPE_INT64 2
CPPTYPE_UINT32 3
CPPTYPE_UINT64 4
CPPTYPE_DOUBLE 5
CPPTYPE_FLOAT 6
CPPTYPE_BOOL 7
CPPTYPE_ENUM 8
CPPTYPE_STRING 9
CPPTYPE_MESSAGE 10
MAX_CPPTYPE 10

Lite alternative to FieldDescriptor::CppType. Must be kept in sync.

Defined at line 120 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h

enum Operation
Name Value
PARSE 0
SERIALIZE 1

Defined at line 319 of file ../../third_party/protobuf/src/src/google/protobuf/wire_format_lite.h