chaokunyang commented on issue #2337: URL: https://github.com/apache/fory/issues/2337#issuecomment-2984163407
I think we can go for compact packing first, and add other features in future. For varint, I just found a encoding method: - Use one bit to indicate whether the value can be represented inline - Use 2 bytes for int32/64 first, with range `-8192 ~8191` - If value is out of this range, then use the 15 bits for offset in variable region, with every int32 as 4 bytes, and int64 as 8 bytes. - And put int32/64 fields first so we can represent max fields up to `32767 / 2` which is 16383 fields. (Suppose it's used for a big wide table which have 10000+ columns, or for features of some online search and recomandation systemds ) -- 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]
