mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
Correct Compact Size Uint ranges
This commit is contained in:
parent
4c9a38f8e3
commit
2952c309cb
1 changed files with 6 additions and 6 deletions
|
@ -407,11 +407,11 @@ byte is prefixed to the number to indicate its length---but otherwise
|
|||
the numbers look like regular unsigned integers in little-endian order.
|
||||
|
||||
| Value | Bytes Used | Format
|
||||
|-----------------------|------------|-----------------------------------------
|
||||
| <= 252 | 1 | uint8_t
|
||||
| <= 0xffff | 3 | 0xfd followed by the number as uint16_t
|
||||
| <= 0xffffffff | 5 | 0xfe followed by the number as uint32_t
|
||||
| <= 0xffffffffffffffff | 9 | 0xff followed by the number as uint64_t
|
||||
|-----------------------------------------|------------|-----------------------------------------
|
||||
| >= 0 && <= 252 | 1 | uint8_t
|
||||
| >= 253 && <= 0xffff | 3 | 0xfd followed by the number as uint16_t
|
||||
| >= 0x10000 && <= 0xffffffff | 5 | 0xfe followed by the number as uint32_t
|
||||
| >= 0x100000000 && <= 0xffffffffffffffff | 9 | 0xff followed by the number as uint64_t
|
||||
|
||||
For example, the number 515 is encoded as 0xfd0302.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue