WPILibC++  2019.1.1-beta-2-8-g9207d78
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
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_
WPILib C++ utilities (wpiutil) namespace.
Definition: SmallString.h:21
uint64_t WriteUleb128(SmallVectorImpl< char > &dest, uint64_t val)
Write unsigned LEB128 data : the address where the ULEB128 data is to be stored : value to be stored...
uint64_t SizeUleb128(uint64_t val)
Get size of unsigned LEB128 data : value.
uint64_t ReadUleb128(const char *addr, uint64_t *ret)
Read unsigned LEB128 data : the address where the ULEB128 data is stored : address to store the resul...