Lines Matching refs:write

351   def EncodeVarint(write, value):  argument
355 write(local_chr(0x80|bits))
358 return write(local_chr(bits))
369 def EncodeSignedVarint(write, value): argument
375 write(local_chr(0x80|bits))
378 return write(local_chr(bits))
422 def EncodePackedField(write, value): argument
423 write(tag_bytes)
427 local_EncodeVarint(write, size)
429 encode_value(write, element)
433 def EncodeRepeatedField(write, value): argument
435 write(tag_bytes)
436 encode_value(write, element)
440 def EncodeField(write, value): argument
441 write(tag_bytes)
442 return encode_value(write, value)
456 def EncodePackedField(write, value): argument
457 write(tag_bytes)
461 local_EncodeVarint(write, size)
463 encode_value(write, modify_value(element))
467 def EncodeRepeatedField(write, value): argument
469 write(tag_bytes)
470 encode_value(write, modify_value(element))
474 def EncodeField(write, value): argument
475 write(tag_bytes)
476 return encode_value(write, modify_value(value))
497 def EncodePackedField(write, value): argument
498 write(tag_bytes)
499 local_EncodeVarint(write, len(value) * value_size)
501 write(local_struct_pack(format, element))
505 def EncodeRepeatedField(write, value): argument
507 write(tag_bytes)
508 write(local_struct_pack(format, element))
512 def EncodeField(write, value): argument
513 write(tag_bytes)
514 return write(local_struct_pack(format, value))
535 def EncodeNonFiniteOrRaise(write, value): argument
538 write(b('\x00\x00\x80\x7F')) ##PY25
541 write(b('\x00\x00\x80\xFF')) ##PY25
544 write(b('\x00\x00\xC0\x7F')) ##PY25
549 def EncodeNonFiniteOrRaise(write, value): argument
551 write(b('\x00\x00\x00\x00\x00\x00\xF0\x7F')) ##PY25
554 write(b('\x00\x00\x00\x00\x00\x00\xF0\xFF')) ##PY25
557 write(b('\x00\x00\x00\x00\x00\x00\xF8\x7F')) ##PY25
570 def EncodePackedField(write, value): argument
571 write(tag_bytes)
572 local_EncodeVarint(write, len(value) * value_size)
577 write(local_struct_pack(format, element))
579 EncodeNonFiniteOrRaise(write, element)
583 def EncodeRepeatedField(write, value): argument
585 write(tag_bytes)
587 write(local_struct_pack(format, element))
589 EncodeNonFiniteOrRaise(write, element)
593 def EncodeField(write, value): argument
594 write(tag_bytes)
596 write(local_struct_pack(format, value))
598 EncodeNonFiniteOrRaise(write, value)
641 def EncodePackedField(write, value): argument
642 write(tag_bytes)
643 local_EncodeVarint(write, len(value))
646 write(true_byte)
648 write(false_byte)
652 def EncodeRepeatedField(write, value): argument
654 write(tag_bytes)
656 write(true_byte)
658 write(false_byte)
662 def EncodeField(write, value): argument
663 write(tag_bytes)
665 return write(true_byte)
666 return write(false_byte)
678 def EncodeRepeatedField(write, value): argument
681 write(tag)
682 local_EncodeVarint(write, local_len(encoded))
683 write(encoded)
686 def EncodeField(write, value): argument
688 write(tag)
689 local_EncodeVarint(write, local_len(encoded))
690 return write(encoded)
702 def EncodeRepeatedField(write, value): argument
704 write(tag)
705 local_EncodeVarint(write, local_len(element))
706 write(element)
709 def EncodeField(write, value): argument
710 write(tag)
711 local_EncodeVarint(write, local_len(value))
712 return write(value)
723 def EncodeRepeatedField(write, value): argument
725 write(start_tag)
726 element._InternalSerialize(write)
727 write(end_tag)
730 def EncodeField(write, value): argument
731 write(start_tag)
732 value._InternalSerialize(write)
733 return write(end_tag)
744 def EncodeRepeatedField(write, value): argument
746 write(tag)
747 local_EncodeVarint(write, element.ByteSize())
748 element._InternalSerialize(write)
751 def EncodeField(write, value): argument
752 write(tag)
753 local_EncodeVarint(write, value.ByteSize())
754 return value._InternalSerialize(write)
782 def EncodeField(write, value): argument
783 write(start_bytes)
784 local_EncodeVarint(write, value.ByteSize())
785 value._InternalSerialize(write)
786 return write(end_bytes)