VLQ编码
https://github.com/mozilla/source-map/blob/master/lib/base64-vlq.js
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| toVLQSigned | 1 | Converts from a two-complement value to a value where the sign bit Is placed in the least significant bit. |
| fromVLQSigned | 1 | Converts to a two-complement value from a value where the sign bit Is Is placed in the least significant bit. |
| base64VLQ_decode | 2 | Decodes the next VLQValue from the provided chars. |
| base64VLQ_encode | 1 | |
| getIntegers | 1 |
03 Fields
| Name | Overloads | Summary |
|---|---|---|
| VLQ_BASE_SHIFT | 1 | A single base 64 digit can contain 6 bits of data. |
| VLQ_BASE | 1 | binary 100000 |
| VLQ_BASE_MASK | 1 | binary 011111 |
| VLQ_CONTINUATION_BIT | 1 | binary 100000 |
04 Members
Int32)Converts from a two-complement value to a value where the sign bit Is placed in the least significant bit.
For example, as decimals:
| Name | Type | Description |
|---|---|---|
a | Int32 | - |
Int32)Converts to a two-complement value from a value where the sign bit Is Is placed in the least significant bit.
For example, as decimals:
| Name | Type | Description |
|---|---|---|
value | Int32 | - |
String)Decodes the next VLQValue from the provided chars.
| Name | Type | Description |
|---|---|---|
[in] | String | - |
CharEnumerator)Decodes the next VLQValue from the provided chars.
A single base 64 digit can contain 6 bits of data. For the base 64 variable length quantities we use in the source map spec, the first bit Is the sign, the next four bits are the actual value, And the 6th bit Is the continuation bit. The continuation bit tells us whether there are more digits in this value following this digit.
Continuation
| Sign
| |
V V
101011binary 100000
binary 011111
binary 100000
Int32)String)