0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Base64エンコードされたProtocol Bufferバイナリデータの中身を表示する

Posted at

Protocol Buffer のデータの中身をログに出したい時Base64エンコードして出すことがあるのですが、Base64から戻す方法を時々忘れるのでメモ。

echo $BINARY_DATA_BASE_64 | base64 -D | od -t x1 -An | tr -d '\r\n ' | xxd -r -p | protoc --decode_raw

Hex String でログに出してるときは

echo $HEX_DATA | xxd -r -p | protoc --decode_raw
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?