Bryan Beaudreault created HBASE-27334:
-----------------------------------------

             Summary: Add support for unsigned varint to Bytes util class
                 Key: HBASE-27334
                 URL: https://issues.apache.org/jira/browse/HBASE-27334
             Project: HBase
          Issue Type: New Feature
            Reporter: Bryan Beaudreault


Our current Bytes.vintToBytes accepts a signed long, and the resulting encoded 
size is larger than it needs to be for small values. For example, 
Bytes.vintToBytes requires 3 bytes for values over 255, whereas an unsigned 
implementation can use 2 bytes for up to 16383. This continues across the 
spectrum, with the current requiring 4 bytes for values over 65535 and an 
unsigned impl can use 3 bytes up to 2097151, etc.

We can pull the implementation from CodedInputStream and CodedOutputStream



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to