LiangliangSui commented on code in PR #1603:
URL: https://github.com/apache/incubator-fury/pull/1603#discussion_r1591136077
##########
docs/specification/xlang_serialization_spec.md:
##########
@@ -288,23 +288,27 @@ Meta header is a 64 bits number value encoded in little
endian order.
fields, then use fields info in meta for deserializing compatible fields.
- type id: the registered id for the current type, which will be written as an
unsigned varint.
- field info:
- - Header(8 bits):
- - Format:
- - `reserved 1 bit + 3 bits field name encoding + polymorphism flag
+ nullability flag + ref tracking flag + tag id flag`.
- - Users can use annotation to provide that info.
- - tag id: when set to 1, the field name will be written by an
unsigned varint tag id.
- - ref tracking: when set to 0, ref tracking will be disabled for
this field.
- - nullability: when set to 0, this field won't be null.
- - polymorphism: when set to 1, the actual type of field will be
the declared field type even the type if
- not `final`.
- - 3 bits field name encoding will be set to meta string encoding
flags when tag id is not set.
- - Type id:
+ - header(8
+ bits): `3 bits size + 2 bits field name encoding + polymorphism flag +
nullability flag + ref tracking flag`.
+ Users can use annotation to provide those info.
+ - 2 bits field name encoding:
+ - encoding:
`UTF8/ALL_TO_LOWER_SPECIAL/LOWER_UPPER_DIGIT_SPECIAL/TAG_ID`
+ - If tag id is used, i.e. field name is written by an unsigned
varint tag id. 2 bits encoding will be `11`.
+ - size of field name:
+ - The `3 bits size: 0~7` will be used to indicate length `1~7`,
the value `7` indicates to read more bytes,
+ the encoding will encode `size - 7` as a varint next.
Review Comment:
Got it, thanks!
--
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]