From 46b220e042d69a9b0ad79eda825fd91d1af2a9a7 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Fri, 22 Nov 2019 10:27:59 -0500 Subject: [PATCH] LEB128 --- preserves.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/preserves.md b/preserves.md index 0757c2e..fb361c7 100644 --- a/preserves.md +++ b/preserves.md @@ -9,6 +9,7 @@ August 2019. Version 0.0.6. [sexp.txt]: http://people.csail.mit.edu/rivest/Sexp.txt [spki]: http://world.std.com/~cme/html/spki.html [varint]: https://developers.google.com/protocol-buffers/docs/encoding#varints + [LEB128]: https://en.wikipedia.org/wiki/LEB128 [erlang-map]: http://erlang.org/doc/reference_manual/data_types.html#map [abnf]: https://tools.ietf.org/html/rfc7405 @@ -494,9 +495,13 @@ appropriate non-negative integers: or leadbyte(t,n,15) ++ varint(m) otherwise The additional length bytes are formatted as -[base 128 varints][varint]. We write `varint(m)` for the -varint-encoding of `m`. Quoting the [Google Protocol Buffers][varint] -definition, +[base 128 varints][varint].[^see-also-leb128] We write `varint(m)` for +the varint-encoding of `m`. Quoting the +[Google Protocol Buffers][varint] definition, + + [^see-also-leb128]: Also known as [LEB128][] encoding, for unsigned + integers. Varints and LEB128-encoded integers differ only for + signed integers, which are not used in Preserves. > Each byte in a varint, except the last byte, has the most > significant bit (msb) set – this indicates that there are further