Skip to content

BTLX Wire Format ​

当前结论 ​

在当前 exact EW7 3.5.0 与 WS 3.2.2 corpus 范围内,BTLX payload 从第一个字节开始就是有效 protobuf wire stream。

这里的“protobuf”首先是wire-format 结论,随后才由 native Game.proto descriptor 给出 message/field typing。两层证据不能倒置。

Wire type ​

Wire type编码族当前 parser
0varint支持
1fixed64支持
2length-delimited支持
3 / 4group start / end支持并严格匹配
5fixed32支持

当前 root corpus 实际主要使用 wire 0、2、5;parser 仍按通用 protobuf wire 规则处理其它合法 wire type。

Lossless 边界 ​

当前 research wire model 的 serialize_preserving 直接拼接每个 field 的原始 raw bytes,因此可保留:

  • 原始 field 顺序;
  • duplicate occurrences;
  • unknown fields;
  • 非 canonical varint;
  • 未解释的 length-delimited payload。

这不是“语义 writer”。后续 Lossless Codec 必须继续坚持:未编辑字段默认保持原始 wire bytes,不因获得 descriptor 就把整个文件 canonical reserialize。

不应做的推断 ​

以下推断当前都不成立:

  1. “能 parse 成 protobuf” = “知道完整 schema”;
  2. “length-delimited 子块能递归 parse” = “它一定是 nested message”;
  3. “EW7 和 WS field number 一样” = “语义相同”;
  4. “descriptor 有字段名” = “知道 gameplay effect”;
  5. “round-trip 成功” = “游戏 runtime serializer 已定位”。