-
Notifications
You must be signed in to change notification settings - Fork 384
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
Repeated primitive fields do not default to packed output in proto3. #704
Comments
rcorre
added a commit
to rcorre/rust-protobuf
that referenced
this issue
Jan 16, 2024
Fixes stepancheg#704. In proto3, repeated primitive fields should be packed by default: https://protobuf.dev/programming-guides/encoding/#packed
rcorre
added a commit
to rcorre/rust-protobuf
that referenced
this issue
Jan 17, 2024
Fixes stepancheg#704. In proto3, repeated primitive fields should be packed by default: https://protobuf.dev/programming-guides/encoding/#packed
stepancheg
pushed a commit
that referenced
this issue
Feb 25, 2024
Fixes #704. In proto3, repeated primitive fields should be packed by default: https://protobuf.dev/programming-guides/encoding/#packed
vaikzs
pushed a commit
to vaikzs/rust-protobuf
that referenced
this issue
Jun 1, 2024
Fixes stepancheg#704. In proto3, repeated primitive fields should be packed by default: https://protobuf.dev/programming-guides/encoding/#packed
stepancheg
pushed a commit
that referenced
this issue
Jun 16, 2024
Fixes #704. In proto3, repeated primitive fields should be packed by default: https://protobuf.dev/programming-guides/encoding/#packed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given the following proto file:
And the following rust code:
Produces a 12-byte file:
If I change the field to
repeated uint32 i = 1 [packed=false];
, I get the same output.If I change the field to
repeated uint32 i = 1 [packed=true];
, instead I get an 8-byte file:For a proto3 file,
packed
should be the default:The text was updated successfully, but these errors were encountered: