Google.Protobuf.WireFormat

This class is used internally by the Protocol Buffer Library and generated message implementations.

Summary

It is public only for the sake of those generated messages. Others should not use this class directly.

This class contains constants and helper functions useful for dealing with the Protocol Buffer wire format.

Public types

WireType{
  Varint = 0,
  Fixed64 = 1,
  LengthDelimited = 2,
  StartGroup = 3,
  EndGroup = 4,
  Fixed32 = 5
}
enum
Wire types within protobuf encoding.

Public static functions

GetTagFieldNumber(uint tag)
int
Given a tag value, determines the field number (the upper 29 bits).
GetTagWireType(uint tag)
WireType
Given a tag value, determines the wire type (lower 3 bits).
MakeTag(int fieldNumber, WireType wireType)
uint
Makes a tag value given a field number and wire type.

Public types

WireType

 WireType

Wire types within protobuf encoding.

Properties
EndGroup

An "end group" value - not supported by this implementation.

Fixed32

A fixed-length 32-bit value.

Fixed64

A fixed-length 64-bit value.

LengthDelimited

A length-delimited value, i.e.

a length followed by that many bytes of data.

StartGroup

A "start group" value - not supported by this implementation.

Varint

Variable-length integer.

Public static functions

GetTagFieldNumber

int GetTagFieldNumber(
  uint tag
)

Given a tag value, determines the field number (the upper 29 bits).

GetTagWireType

WireType GetTagWireType(
  uint tag
)

Given a tag value, determines the wire type (lower 3 bits).

MakeTag

uint MakeTag(
  int fieldNumber,
  WireType wireType
)

Makes a tag value given a field number and wire type.