mattprecious / protogram

Quick and easy proto deserialization
https://mattprecious.github.io/protogram/
Apache License 2.0
113 stars 2 forks source link

Allow piping a binary file to stdin #17

Closed JakeWharton closed 4 years ago

JakeWharton commented 4 years ago
$ cli/build/bin/protogram 0804120610e80718c806
┌─ 1: 4
╰- 2 ┐
     ├─ 2: 1000
     ╰- 3: 840

$ echo 0804120610e80718c806 | xxd -p -r > test.pb
$ cat test.pb | cli/build/bin/protogram
┌─ 1: 4
╰- 2 ┐
     ├─ 2: 1000
     ╰- 3: 840

$ cli/build/bin/protogram
Error: Attempted to read bytes from stdin but was empty.

Usage: protogram [OPTIONS] [hex]

Options:
  -h, --help  Show this message and exit

Arguments:
  hex  Encoded proto bytes as hex

Closes #13