Index: src/varint.c ================================================================== --- src/varint.c +++ src/varint.c @@ -36,21 +36,21 @@ ** If A0 is between 241 and 248 inclusive, then the result is ** 240+256*(A0-241)+A1. ** ** If A0 is 249 then the result is 2288+256*A1+A2. ** -** If A0 is 250 then the result is A1..A3 as a 3-byte big-ending integer. -** -** If A0 is 251 then the result is A1..A4 as a 4-byte big-ending integer. -** -** If A0 is 252 then the result is A1..A5 as a 5-byte big-ending integer. -** -** If A0 is 253 then the result is A1..A6 as a 6-byte big-ending integer. -** -** If A0 is 254 then the result is A1..A7 as a 7-byte big-ending integer. -** -** If A0 is 255 then the result is A1..A8 as a 8-byte big-ending integer. +** If A0 is 250 then the result is A1..A3 as a 3-byte big-endian integer. +** +** If A0 is 251 then the result is A1..A4 as a 4-byte big-endian integer. +** +** If A0 is 252 then the result is A1..A5 as a 5-byte big-endian integer. +** +** If A0 is 253 then the result is A1..A6 as a 6-byte big-endian integer. +** +** If A0 is 254 then the result is A1..A7 as a 7-byte big-endian integer. +** +** If A0 is 255 then the result is A1..A8 as a 8-byte big-endian integer. ** ** ENCODE ** ** Let the input value be V. ** @@ -62,23 +62,23 @@ ** as (V-2288)%256. ** ** If V<=16777215 then output A0 as 250 and A1 through A3 as a big-endian ** 3-byte integer. ** -** If V<=4294967295 then output A0 as 251 and A1..A4 as a big-ending +** If V<=4294967295 then output A0 as 251 and A1..A4 as a big-endian ** 4-byte integer. ** -** If V<=1099511627775 then output A0 as 252 and A1..A5 as a big-ending +** If V<=1099511627775 then output A0 as 252 and A1..A5 as a big-endian ** 5-byte integer. ** -** If V<=281474976710655 then output A0 as 253 and A1..A6 as a big-ending +** If V<=281474976710655 then output A0 as 253 and A1..A6 as a big-endian ** 6-byte integer. ** ** If V<=72057594037927935 then output A0 as 254 and A1..A7 as a -** big-ending 7-byte integer. +** big-endian 7-byte integer. ** -** Otherwise then output A0 as 255 and A1..A8 as a big-ending 8-byte integer. +** Otherwise then output A0 as 255 and A1..A8 as a big-endian 8-byte integer. ** ** SUMMARY ** ** Bytes Max Value Digits ** ------- --------- ---------