Github user czm1989 commented on the issue:
https://github.com/apache/thrift/pull/1052
@nsuke Yes, I agree.
It also can simply be `$hi |= (($byte & 0x7f) >> 4);` because of the shift
is only 28 that satisfy the condition.
But according to the algorithm of writeVarint, I think
`elseif ($shift > 25) {
$hi |= (($byte & 0x7f) >> (32 - $shift));
}`
to be the best.
(When the shift is 25, the 7 bit only fill in the low 32bits. so the
condition should be `$shift > 25`.)
Thanks for reading.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---