Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 864857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:32:53+00:00 2026-05-15T09:32:53+00:00

I need help identifying the following number format. For example, the following number format

  • 0

I need help identifying the following number format.

For example, the following number format in MIB:

0x94 0x78 = 2680
0x94 0x78 in binary: [1001 0100] [0111 1000]

It seems that if the MSB is 1, it means another character follows it. And if it is 0, it is the end of the number.

So the value 2680 is [001 0100] [111 1000], formatted properly is [0000 1010] [0111 1000]

What is this number format called and what’s a good way for computing this besides bit manipulation and shifting to a larger unsigned integer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T09:32:54+00:00Added an answer on May 15, 2026 at 9:32 am

    I have seen this called either 7bhm (7-bit has-more) or VLQ (variable length quantity); see http://en.wikipedia.org/wiki/Variable-length_quantity

    This is stored big-endian (most significant byte first), as opposed to the C# BinaryReader.Read7BitEncodedInt method described at Encoding an integer in 7-bit format of C# BinaryReader.ReadString

    I am not aware of any method of decoding other than bit manipulation.

    Sample PHP code can be found at
    http://php.net/manual/en/function.intval.php#62613

    or in Python I would do something like

    def encode_7bhm(i):
        o = [ chr(i & 0x7f) ]
        i /= 128
    
        while i > 0:
            o.insert(0, chr(0x80 | (i & 0x7f)))
            i /= 128
    
        return ''.join(o)
    
    
    def decode_7bhm(s):
        o = 0
    
        for i in range(len(s)):
            v = ord(s[i])
            o = 128*o + (v & 0x7f)
    
            if v & 0x80 == 0:
                # found end of encoded value
                break
        else:
            # out of string, and end not found - error!
            raise TypeError
    
        return o
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need help identifying what these ANSI escape sequences represent. I'm currently filtering/evaluating the
Hello I need help in identifying the first character of a string. if the
I need help identifying the reason why an exception is being thrown and how
Need help in date conversion: Existing date format: Wed, 01 Dec 2010 00:00:00 -0500
Need help with following situation: Users can generate their own data structures which are
I need help identifying twitter handles (I think it's called a handle..) inside plain-text
I need some help identifying, and eliminating, the cause of an odd child process
Need help with the following. I am creating two different combinations of view/controllers that
I need help in identifying how I should set up this non public website.
Need help I have following code with classic asp <select name=state id=state> <option value=NJ>New

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.