解码没有原始文件的Protobuf

发布于 2025-01-28 15:26:22 字数 824 浏览 2 评论 0原文

我想解码Protobuf数据并遇到一些解码挑战。

1> Example of the protobuf data: 0a06282c0241057a10011805220d080510bea3f493062a03010c1628f1a6f493063002382b4001481482010f383634333233303532343736343839

2> 在线解码(例如, https://protobuf-decoder.netlify.netlify.app/ < /a>)效果很好

3&gt;通过 protoc.exe解码不起作用

  • protoc.exe -decode_raw&lt; MESUREMENT01_BIN.TXT(尝试过十六进制或箱作为输入)
  • 结果:无法解析输入。
  • 问题:我做什么不正确?

4&gt;此外,我想在云解决方案(内存)中添加Protobuf解码器,理想情况下不依赖于Protoc(在我的环境中,几乎不可能运行EXE)。因此,我正在寻找运行时< / strong>中的独立解析器 / RAW解码器,而不是使用原始文件。

  • 问题:您对我如何设置有想法吗?

多谢

I would like to decode protobuf data and running into some decoding challenges.

1> Example of the protobuf data: 0a06282c0241057a10011805220d080510bea3f493062a03010c1628f1a6f493063002382b4001481482010f383634333233303532343736343839

2> Decoding online (e.g. via https://protobuf-decoder.netlify.app/) works fine

3> Decoding via protoc.exe is not working

  • protoc.exe --decode_raw < measurement01_bin.txt (have tried HEX or BIN as input)
  • Result: Failed to parse input.
  • Question: What am I not doing correct?

4> Further I would like to add protobuf decoder in a cloud solution (in-memory) and ideally not be dependent on protoc (in my environment it is almost impossible to run an exe). So I am looking for a stand-alone parser / raw decoder in run-time and not using proto files.

  • Question: Do you have idea for me on how I could set this up?

Thanks a lot

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文