Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextgen Proto Pythonic API: “Add-on” proto for length prefixed serialize/parse #16965

Merged
1 commit merged into from
May 29, 2024

Conversation

copybara-service[bot]
Copy link

Nextgen Proto Pythonic API: “Add-on” proto for length prefixed serialize/parse

Added the following methods:
serialize_length_prefixed(message: Message, output: io.BytesIO) -> None
parse_length_prefixed(message_class: Type[Message], input_bytes: io.BytesIO) -> Message

The output of serialize_length_prefixed should be BytesIO or custom buffered IO that data should be written to. The output stream must be buffered, e.g. using
https://docs.python.org/3/library/io.html#buffered-streams.

@copybara-service copybara-service bot force-pushed the test_634637782 branch 4 times, most recently from 738f4cf to c0ac9a6 Compare May 29, 2024 19:28
…ize/parse

Added the following methods:
serialize_length_prefixed(message: Message, output: io.BytesIO) -> None
parse_length_prefixed(message_class: Type[Message], input_bytes: io.BytesIO) -> Message

The output of serialize_length_prefixed should be BytesIO or custom buffered IO that data should be written to. The output stream must be buffered, e.g. using
  https://docs.python.org/3/library/io.html#buffered-streams.

PiperOrigin-RevId: 638375900
@copybara-service copybara-service bot closed this pull request by merging all changes into main in 3a9f074 May 29, 2024
@copybara-service copybara-service bot deleted the test_634637782 branch May 29, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant