WPILibC++  2020.3.2
leb128.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2015-2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #ifndef WPIUTIL_WPI_LEB128_H_
9 #define WPIUTIL_WPI_LEB128_H_
10 
11 #include <cstddef>
12 
13 #include "wpi/SmallVector.h"
14 
15 namespace wpi {
16 
17 class raw_istream;
18 
28 uint64_t SizeUleb128(uint64_t val);
29 
40 uint64_t WriteUleb128(SmallVectorImpl<char>& dest, uint64_t val);
41 
52 uint64_t ReadUleb128(const char* addr, uint64_t* ret);
53 
64 bool ReadUleb128(raw_istream& is, uint64_t* ret);
65 
66 } // namespace wpi
67 
68 #endif // WPIUTIL_WPI_LEB128_H_
wpi
WPILib C++ utilities (wpiutil) namespace.
Definition: EventLoopRunner.h:17
wpi::WriteUleb128
uint64_t WriteUleb128(SmallVectorImpl< char > &dest, uint64_t val)
Write unsigned LEB128 data @addr: the address where the ULEB128 data is to be stored @val: value to b...
wpi::ReadUleb128
uint64_t ReadUleb128(const char *addr, uint64_t *ret)
Read unsigned LEB128 data @addr: the address where the ULEB128 data is stored @ret: address to store ...
wpi::SizeUleb128
uint64_t SizeUleb128(uint64_t val)
Get size of unsigned LEB128 data @val: value.