Hacked By AnonymousFox

Current Path : /lib/python2.7/site-packages/google/protobuf/internal/
Upload File :
Current File : //lib/python2.7/site-packages/google/protobuf/internal/wire_format.pyc

�
Du�ac@s'dZdZddlZddlmZddlmZdZde>dZdZdZ	d	Z
dZd
ZdZ
dZed3�Zed5�Zd7Zd9Zd;Zd=ZdZdZdZdZeje�d
kr�ed��neje�dkred��nd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d �Z%d!�Z&d"�Z'd#�Z(d$�Z)d%�Z*d&�Z+d'�Z,d(�Z-d)�Z.d*�Z/d+�Z0d,�Z1d-�Z2d.�Z3d/�Z4d0�Z5ej6j7ej6j8ej6j9ej6j:fZ;d1�Z<dS(>sFConstants and static functions to support protocol buffer wire format.s#robinson@google.com (Will Robinson)i����N(t
descriptor(tmessageiiiiiiii i?i@s<Is<Qs<fs<ds"Format "I" is not a 32-bit number.is"Format "Q" is not a 64-bit number.cCs>d|kotkns2tjd|��n|t>|BS(sReturns an unsigned 32-bit integer that encodes the field number and
  wire type information in standard protocol message wire format.

  Args:
    field_number: Expected to be an integer in the range [1, 1 << 29)
    wire_type: One of the WIRETYPE_* constants.
  isUnknown wire type: %d(t
_WIRETYPE_MAXRtEncodeErrort
TAG_TYPE_BITS(tfield_numbert	wire_type((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytPackTagPscCs|t?|t@fS(skThe inverse of PackTag().  Given an unsigned 32-bit number,
  returns a (field_number, wire_type) tuple.
  (Rt
TAG_TYPE_MASK(ttag((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pyt	UnpackTag]scCs |dkr|d>S|d>dAS(s�ZigZag Transform:  Encodes signed integers so that they can be
  effectively used with varint encoding.  See wire_format.h for
  more details.
  iii����((tvalue((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytZigZagEncodedscCs|d@s|d?S|d?dAS(sInverse of ZigZagEncode().iii����((R((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytZigZagDecodens
cCs
t||�S(N(t
Int64ByteSize(Rtint32((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pyt
Int32ByteSizezscCstd|@�S(Nl����(t_VarUInt64ByteSizeNoTag(R((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytInt32ByteSizeNoTag~scCst|d|@�S(Nl����(tUInt64ByteSize(Rtint64((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pyR�scCs
t||�S(N(R(Rtuint32((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytUInt32ByteSize�scCst|�t|�S(N(tTagByteSizeR(Rtuint64((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pyR�scCst|t|��S(N(RR(RR((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytSInt32ByteSize�scCst|t|��S(N(RR(RR((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytSInt64ByteSize�scCst|�dS(Ni(R(Rtfixed32((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytFixed32ByteSize�scCst|�dS(Ni(R(Rtfixed64((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytFixed64ByteSize�scCst|�dS(Ni(R(Rtsfixed32((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytSFixed32ByteSize�scCst|�dS(Ni(R(Rtsfixed64((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytSFixed64ByteSize�scCst|�dS(Ni(R(Rtflt((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pyt
FloatByteSize�scCst|�dS(Ni(R(Rtdouble((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytDoubleByteSize�scCst|�dS(Ni(R(Rtb((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytBoolByteSize�scCs
t||�S(N(R(Rtenum((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytEnumByteSize�scCst||jd��S(Nsutf-8(t
BytesByteSizetencode(Rtstring((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytStringByteSize�scCs$t|�tt|��t|�S(N(RRtlen(RR'((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pyR+�scCsdt|�|j�S(Ni(RtByteSize(RR((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pyt
GroupByteSize�s
cCs$t|�t|j��|j�S(N(RRR0(RR((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytMessageByteSize�scCs^dtd�td�td�}|t|�7}|j�}|t|�7}||7}|S(Niii(RRR0(Rtmsgt
total_sizetmessage_size((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytMessageSetItemByteSize�s$
cCstt|d��S(sEReturns the bytes required to serialize a tag with this field number.i(RR(R((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pyR�scCs�|dkrdS|dkr dS|dkr0dS|dkr@dS|d	krPd
S|dkr`dS|d
krpdS|dkr�dS|dkr�dS|tkr�tjd|��ndS(s�Returns the number of bytes required to serialize a single varint
  using boundary value comparisons. (unrolled loop optimization -WPierce)
  uint64 must be unsigned.
  iii�?ii��ii���il��il���il���il����il����i	sValue out of range: %di
(t
UINT64_MAXRR(R((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pyR�s*cCs
|tkS(s�Return true iff packable = true is valid for fields of this type.

  Args:
    field_type: a FieldDescriptor::Type value.

  Returns:
    True iff fields of this type are packable.
  (tNON_PACKABLE_TYPES(t
field_type((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pytIsTypePackables	ll��ll����ll��ll����ll����ll����(=t__doc__t
__author__tstructtgoogle.protobufRRRRtWIRETYPE_VARINTtWIRETYPE_FIXED64tWIRETYPE_LENGTH_DELIMITEDtWIRETYPE_START_GROUPtWIRETYPE_END_GROUPtWIRETYPE_FIXED32Rtintt	INT32_MAXt	INT32_MINt
UINT32_MAXt	INT64_MAXt	INT64_MINR7tFORMAT_UINT32_LITTLE_ENDIANtFORMAT_UINT64_LITTLE_ENDIANtFORMAT_FLOAT_LITTLE_ENDIANtFORMAT_DOUBLE_LITTLE_ENDIANtcalcsizetAssertionErrorRR
RR
RRRRRRRRRR R"R$R&R(R*R.R+R1R2R6RRtFieldDescriptortTYPE_STRINGt
TYPE_GROUPtTYPE_MESSAGEt
TYPE_BYTESR8R:(((sH/usr/lib/python2.7/site-packages/google/protobuf/internal/wire_format.pyt<module>st	
		
																										

Hacked By AnonymousFox1.0, Coded By AnonymousFox