Lines Matching refs:write
344 def EncodeVarint(write, value): argument
348 write(local_chr(0x80|bits))
351 return write(local_chr(bits))
361 def EncodeSignedVarint(write, value): argument
367 write(local_chr(0x80|bits))
370 return write(local_chr(bits))
413 def EncodePackedField(write, value): argument
414 write(tag_bytes)
418 local_EncodeVarint(write, size)
420 encode_value(write, element)
424 def EncodeRepeatedField(write, value): argument
426 write(tag_bytes)
427 encode_value(write, element)
431 def EncodeField(write, value): argument
432 write(tag_bytes)
433 return encode_value(write, value)
447 def EncodePackedField(write, value): argument
448 write(tag_bytes)
452 local_EncodeVarint(write, size)
454 encode_value(write, modify_value(element))
458 def EncodeRepeatedField(write, value): argument
460 write(tag_bytes)
461 encode_value(write, modify_value(element))
465 def EncodeField(write, value): argument
466 write(tag_bytes)
467 return encode_value(write, modify_value(value))
488 def EncodePackedField(write, value): argument
489 write(tag_bytes)
490 local_EncodeVarint(write, len(value) * value_size)
492 write(local_struct_pack(format, element))
496 def EncodeRepeatedField(write, value): argument
498 write(tag_bytes)
499 write(local_struct_pack(format, element))
503 def EncodeField(write, value): argument
504 write(tag_bytes)
505 return write(local_struct_pack(format, value))
525 def EncodeNonFiniteOrRaise(write, value): argument
528 write('\x00\x00\x80\x7F')
530 write('\x00\x00\x80\xFF')
532 write('\x00\x00\xC0\x7F')
536 def EncodeNonFiniteOrRaise(write, value): argument
538 write('\x00\x00\x00\x00\x00\x00\xF0\x7F')
540 write('\x00\x00\x00\x00\x00\x00\xF0\xFF')
542 write('\x00\x00\x00\x00\x00\x00\xF8\x7F')
554 def EncodePackedField(write, value): argument
555 write(tag_bytes)
556 local_EncodeVarint(write, len(value) * value_size)
561 write(local_struct_pack(format, element))
563 EncodeNonFiniteOrRaise(write, element)
567 def EncodeRepeatedField(write, value): argument
569 write(tag_bytes)
571 write(local_struct_pack(format, element))
573 EncodeNonFiniteOrRaise(write, element)
577 def EncodeField(write, value): argument
578 write(tag_bytes)
580 write(local_struct_pack(format, value))
582 EncodeNonFiniteOrRaise(write, value)
623 def EncodePackedField(write, value): argument
624 write(tag_bytes)
625 local_EncodeVarint(write, len(value))
628 write(true_byte)
630 write(false_byte)
634 def EncodeRepeatedField(write, value): argument
636 write(tag_bytes)
638 write(true_byte)
640 write(false_byte)
644 def EncodeField(write, value): argument
645 write(tag_bytes)
647 return write(true_byte)
648 return write(false_byte)
660 def EncodeRepeatedField(write, value): argument
663 write(tag)
664 local_EncodeVarint(write, local_len(encoded))
665 write(encoded)
668 def EncodeField(write, value): argument
670 write(tag)
671 local_EncodeVarint(write, local_len(encoded))
672 return write(encoded)
684 def EncodeRepeatedField(write, value): argument
686 write(tag)
687 local_EncodeVarint(write, local_len(element))
688 write(element)
691 def EncodeField(write, value): argument
692 write(tag)
693 local_EncodeVarint(write, local_len(value))
694 return write(value)
705 def EncodeRepeatedField(write, value): argument
707 write(start_tag)
708 element._InternalSerialize(write)
709 write(end_tag)
712 def EncodeField(write, value): argument
713 write(start_tag)
714 value._InternalSerialize(write)
715 return write(end_tag)
726 def EncodeRepeatedField(write, value): argument
728 write(tag)
729 local_EncodeVarint(write, element.ByteSize())
730 element._InternalSerialize(write)
733 def EncodeField(write, value): argument
734 write(tag)
735 local_EncodeVarint(write, value.ByteSize())
736 return value._InternalSerialize(write)
763 def EncodeField(write, value): argument
764 write(start_bytes)
765 local_EncodeVarint(write, value.ByteSize())
766 value._InternalSerialize(write)
767 return write(end_bytes)