chaokunyang opened a new issue, #3203:
URL: https://github.com/apache/fory/issues/3203
### Feature Request
update global header for type def, reserve 4 bits in type meta header for
future extensibility
### Is your feature request related to a problem? Please describe
this is current Global header spec:
```text
The 8-byte header is a little-endian uint64:
- Low 12 bits: meta size (number of bytes in the TypeDef body).
- If meta size >= 0xFFF, the low 12 bits are set to 0xFFF and an extra
`varuint32(meta_size - 0xFFF)` follows immediately after the header.
- Bit 12: `HAS_FIELDS_META` (1 = fields metadata present).
- Bit 13: `COMPRESS_META` (1 = body is compressed; decompress before
parsing).
- High 50 bits: hash of the TypeDef body.
```
We don't have reserved bits, it's not easy to change protocol without
breaking binary compatibiity
### Describe the solution you'd like
change it to use `Low 12 bits` to `Low 8 bits`, and use bit 8 for
`HAS_FIELDS_META`, bit `9` for `COMPRESS_META`, and bit 10~13 reserved for
futhre extension, and update xlang_serialization_spec.md and java native
implementation and all language implementations to respect this.
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]