You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "Jens-G (via GitHub)" <gi...@apache.org> on 2026/05/20 20:30:59 UTC

Re: [PR] No ticket: Clarify when the zigzag encoding is used [skip ci] [thrift]

Jens-G commented on PR #3503:
URL: https://github.com/apache/thrift/pull/3503#issuecomment-4502397318

   ### Code review
   
   Found 1 issue:
   
   1. **Double encoding description contradicts the document's own `i64` definition** — the new "Integer encoding" section defines `i16`/`i32`/`i64` as ZigZag-encoded and then varint-encoded. Saying doubles are "encoded as if they were `i64`" implies they go through the same ZigZag+varint pipeline, which is incorrect — doubles are written as 8 raw little-endian bytes with no ZigZag and no varint transformation.
   
   https://github.com/apache/thrift/blob/26f275f507fe8bf04d8db2dd275bf7383b996dc8/doc/specs/thrift-compact-protocol.md#L88-L121
   
   🤖 Generated with [Claude Code](https://claude.ai/code)
   
   <sub>- If this code review was useful, please react with 👍. Otherwise, react with 👎.</sub>


-- 
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: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org