Embedded message compression

43 views
Skip to first unread message

Almon

unread,
Jul 30, 2019, 2:57:35 AM7/30/19
to Protocol Buffers
Hi everyone,

In my project, I use Grpc to exchange messages between server and client by ethernet and I want to dissect in Wireshark all the messages (and embedded messages) who are exchanged.
I have some troubles to dissect embedded message because I see it compressed. For example, my embedded message is 24 bytes length but I see it at 8 bytes length. Althrough, in wireshark, I see the main message not compressed...

Someone know if it's a parameter to set or if it's a grpc internal process?
Else, do we could find the compression algorithm to uncompress embedded message?

Thank you for your help.

Alexandre.

Adam Cozzette

unread,
Jul 30, 2019, 5:46:08 PM7/30/19
to Almon, Protocol Buffers
I'm not sure what kind of compression gRPC does, but there is a GitHub issue here with some instructions on decoding gRPC packets with Wireshark: https://github.com/grpc/grpc/issues/13586

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/bf597ee7-6a69-4abf-9e95-d4917bbbab7d%40googlegroups.com.

Alexandre SIMON

unread,
Jul 31, 2019, 4:02:58 AM7/31/19
to Protocol Buffers
Thanks for your reply, I already found why it doesn't work: uint32 in proto file is converted in varint in line... So I changed uint32 to fixed32 but a second question happen:
 How to force enum to be a fixed32 and not a uint32 (converted in varint)?

Le mardi 30 juillet 2019 23:46:08 UTC+2, Adam Cozzette a écrit :
I'm not sure what kind of compression gRPC does, but there is a GitHub issue here with some instructions on decoding gRPC packets with Wireshark: https://github.com/grpc/grpc/issues/13586

On Mon, Jul 29, 2019 at 11:57 PM Almon <Alexandr...@gmail.com> wrote:
Hi everyone,

In my project, I use Grpc to exchange messages between server and client by ethernet and I want to dissect in Wireshark all the messages (and embedded messages) who are exchanged.
I have some troubles to dissect embedded message because I see it compressed. For example, my embedded message is 24 bytes length but I see it at 8 bytes length. Althrough, in wireshark, I see the main message not compressed...

Someone know if it's a parameter to set or if it's a grpc internal process?
Else, do we could find the compression algorithm to uncompress embedded message?

Thank you for your help.

Alexandre.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prot...@googlegroups.com.

Adam Cozzette

unread,
Jul 31, 2019, 10:49:46 AM7/31/19
to Alexandre SIMON, Protocol Buffers
I don't think there is any way to force enums to use the fixed32 format; they will always be serialized as varints.

One thing to note is that varints are not an optional compression step, they're an important part of the wire format. I suspect it would be much easier to get Wireshark to decode the varints for you than it would be to try to avoid all varints.

To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/8a447438-a7c0-4a7e-b5a0-d1fc7d0869b2%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages