mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Faster decoding of 32-bit variable-length integers in cases were we do not
need to know the number of bytes in the encoding. FossilOrigin-Name: 59a31b16b54a0068c81ee65bc2fa905c2c826e98da3a7ffd8c3ea860a2827b4a
This commit is contained in:
@@ -4426,6 +4426,8 @@ int sqlite3VarintLen(u64 v);
|
||||
*/
|
||||
#define getVarint32(A,B) \
|
||||
(u8)((*(A)<(u8)0x80)?((B)=(u32)*(A)),1:sqlite3GetVarint32((A),(u32 *)&(B)))
|
||||
#define getVarint32NR(A,B) \
|
||||
B=(u32)*(A);if(B>=0x80)sqlite3GetVarint32((A),(u32*)&(B))
|
||||
#define putVarint32(A,B) \
|
||||
(u8)(((u32)(B)<(u32)0x80)?(*(A)=(unsigned char)(B)),1:\
|
||||
sqlite3PutVarint((A),(B)))
|
||||
|
||||
Reference in New Issue
Block a user