Skip to content

Instantly share code, notes, and snippets.

@salrashid123
Created August 26, 2017 20:23
Show Gist options
  • Save salrashid123/2b3cc17f4f37ae0d8bdd2fe85f1bc28a to your computer and use it in GitHub Desktop.
Save salrashid123/2b3cc17f4f37ae0d8bdd2fe85f1bc28a to your computer and use it in GitHub Desktop.
xxd resp.bin
00000000: 0000 0000 1f0a 1d53 7472 6561 6d69 6e67 .......Streaming
00000010: 2048 656c 6c6f 2031 202c 206a 6f68 6e20 Hello 1 , john
00000020: 646f 6521 0000 0000 1e0a 1c53 7472 6561 doe!.......Strea
00000030: 6d69 6e67 2048 656c 6c6f 2032 2c20 6a6f ming Hello 2, jo
00000040: 686e 2064 6f65 21 hn doe!
$ xxd -p resp.bin
000000001f
0a1d53747265616d696e672048656c6c6f2031202c206a6f686e20646f6521
000000001e
0a1c53747265616d696e672048656c6c6f20322c206a6f686e20646f6521
$ echo 0a1d53747265616d696e672048656c6c6f2031202c206a6f686e20646f6521 | xxd -r -p | protoc --decode_raw
1: "Streaming Hello 1 , john doe!"
$ echo 0a1c53747265616d696e672048656c6c6f20322c206a6f686e20646f6521 | xxd -r -p | protoc --decode_raw
1: "Streaming Hello 2, john doe!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment