commit | b88d2317732f0797f29a745e956bb1c7f23e41f6 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Fri Aug 23 17:06:12 2019 +0200 |
committer | Willy Tarreau <w@1wt.eu> | Tue Aug 27 17:14:19 2019 +0200 |
tree | 05deb7a12431e55d16426433f9376c020bba9c03 | |
parent | 4d589e719ba0f7c2421dbb98208de51c3e1cee1d [diff] |
MINOR: buffer: add functions to read/write varints from/to buffers The new functions are : __b_put_varint() : inserts a varint when it's known that it fits b_put_varint() : tries to insert a varint at the tail b_get_varint() : tries to get a varint from the head b_peek_varint() : tries to peek a varint at a specific offset Wrapping is supported so that they are expected to be safe to use to manipulate varints with buffers anywhere.