There was an inconsistency in the code (which suggested the high-order bits in the LEB128 representation of a signed integer should be all 0s and then 1 for the
| This article is rated C-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||
| |||||||||||
There was an inconsistency in the code (which suggested the high-order bits in the LEB128 representation of a signed integer should be all 0s and then 1 for the last byte) and the example for encoding a signed LEB128 (which suggested the high order bits should be all 1s and then 0). I have edited the code to match the explanation.
I ran into this issue when trying to implement a WASM module parser and making this change fixed the bug so I am fairly sure it is correct. I think the rest of the code needs to be tested in light of this. — Preceding unsigned comment added by 146.179.87.9 (talk) 15:36, 6 September 2025 (UTC)
Can somebody please explain why this format ever saw the light of day? It seems so overly complex, unnecessary and wasteful. A simple zero byte terminated little endian string satisfies the requirement for "variable-length code compression used to store arbitrarily large integers" (signed and unsigned). It would be shorter and in some cases, a single instruction to load. The LEC128 is not even a compression - it is an expansion! ArtKocsis (talk) 16:58, 23 February 2023 (UTC)
The "Encode signed integer" pseudocode doesn't match the example in the Signed LEB128 section. I think the example is wrong. 198.20.220.54 (talk) 23:32, 6 September 2018 (UTC)
--88.219.19.145 (talk) 19:34, 2 November 2019 (UTC)
The article [1] "Get started with JDK Flight Recorder in OpenJDK 8u" states that the LEB128 encoding is used in the binary representation of JFR’s recordings. It may be added the "Uses" section of this article. Maxime.bochon (talk) 18:47, 8 September 2020 (UTC)
References
Why does there need to be two separate functions for signed and unsigned integers? To me, the specification on the article doesn't make it clear why that's the case. If there is a good reason for why signed and unsigned conversions are different, that information should really be on the article. Marioood (talk) 03:12, 15 June 2026 (UTC)
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.