Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable-length integer encoding #8

Open
treiher opened this issue Mar 18, 2018 · 1 comment
Open

Variable-length integer encoding #8

treiher opened this issue Mar 18, 2018 · 1 comment

Comments

@treiher
Copy link
Collaborator

treiher commented Mar 18, 2018

Context and Problem Statement

In some protocols, the length field is encoded using a variable-length encoding scheme. In MQTT, such an encoding is used for the Remaining Length field. There are multiple variants of variable-length encoding of integers.

Examples

Variable-Length Quantity (VLQ)

VLQ is used by:

Little Endian Base 128 (LEB128)

LEB128 is used by:

MQTT

Variable Byte Integer (equivalent to ULEB128)

QUIC

Variable-Length Integer Encoding

Bluetooth L2CAP

Protocol/Service Multiplexer - PSM (2 octets (minimum))
The PSM field is at least two octets in length. All PSM values shall have the
least significant bit of the most significant octet equal to 0 and the least
significant bit of all other octets equal to 1.
Note: This means that all PSMs are odd numbers and that the end of a PSM
can be easily found by searching for the first even octet.

(Bluetooth Core Specification v5.2 - Vol 3, Part A, 4.2)

@treiher treiher added this to TODO in RecordFlux 0.3 via automation Mar 18, 2018
@treiher
Copy link
Collaborator Author

treiher commented Mar 18, 2018

It seems not to be possible to specify MQTT with ASN.1 in combination with ACN. ACN only supports the following encodings for integers: pos-int, twos-complement, BCD, ASCII.

@treiher treiher self-assigned this Mar 19, 2018
@treiher treiher moved this from TODO to In Progress in RecordFlux 0.3 Mar 19, 2018
@treiher treiher removed the question label Mar 19, 2018
@treiher treiher moved this from In Progress to Postponed in RecordFlux 0.3 Apr 11, 2018
@senier senier moved this from Postponed to TODO in RecordFlux 0.3 Jul 9, 2018
@treiher treiher removed this from TODO in RecordFlux 0.3 Jan 30, 2019
@treiher treiher added this to To do in RecordFlux Future via automation Jan 30, 2019
@treiher treiher removed their assignment Mar 26, 2019
@treiher treiher mentioned this issue Apr 9, 2020
This was referenced May 13, 2020
@treiher treiher changed the title Support variable-length integer encoding Variable-length integer encoding May 28, 2020
@treiher treiher added the v0.4.1 label Jul 14, 2020
@treiher treiher added the v0.5.0 label Jul 9, 2021
@senier senier moved this from Medium to High in RecordFlux Future Nov 1, 2022
@treiher treiher removed this from High in RecordFlux Future Nov 4, 2022
@treiher treiher added this to To do in RecordFlux 0.8 via automation Nov 4, 2022
@treiher treiher moved this from To do to Design in RecordFlux 0.8 Nov 14, 2022
@senier senier removed this from Design in RecordFlux 0.8 Nov 29, 2022
@senier senier added this to To do in RecordFlux 2023-01-06 via automation Nov 29, 2022
@senier senier removed this from To do in RecordFlux 2023-01-06 Jan 3, 2023
@senier senier added this to To do in RecordFlux 2023-02-24 via automation Jan 3, 2023
@treiher treiher removed their assignment Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants