Use the python version instead: https://github.com/aj3423/protod
The library provides two Renderers: Console and Html, which are used for Console program and web site.
- ConsoleRenderer
out, e := aproto.TryDump([]byte{...})
fmt.Println(out)
// or:
out, e := aproto.TryDumpEx([]byte{...}, &aproto.ConsoleRenderer{})
- HtmlRenderer (used on demo site)
out, e := aproto.TryDumpEx([]byte{...}, &aproto.HtmlRenderer{})
// transfer the output to client browser, render it with
$('#div').text(out)
- Or create other custom Renders, just follow the
Renderer
interface
supported: text/file with hex-string/binary/base64/zlib encoding
eg:
- hex string:
pro 120123
- space/tab/newline will be trimmed:
pro "08 01 12 03 04 05
06 07 08
09 10 111213"
- base64 + zlib string:
pro -b64 EgEj
- binary file:
pro -bin -file a.bin
- zlib+base64 file:
pro -zlib -b64 -file a.bin
- ...
- Install Golang
- clone this repo:
git clone https://github.com/aj3423/aproto
- go to binary dir:
cd aproto/proto_decoder
go build .
MIT