class Decompressor
Declaration
class Decompressor { /* full declaration omitted */ };
Description
Decompressor helps to handle decompression of compressed sections.
Declared at: llvm/include/llvm/Object/Decompressor.h:20
Member Variables
- private llvm::StringRef SectionData
- private uint64_t DecompressedSize
Method Overview
- private Decompressor(llvm::StringRef Data)
- private llvm::Error consumeCompressedZLibHeader(bool Is64Bit, bool IsLittleEndian)
- public static Expected<llvm::object::Decompressor> create(llvm::StringRef Name, llvm::StringRef Data, bool IsLE, bool Is64Bit)
- public llvm::Error decompress(MutableArrayRef<uint8_t> Buffer)
- public uint64_t getDecompressedSize()
- public template <class T>llvm::Error resizeAndDecompress(T & Out)
Methods
¶Decompressor(llvm::StringRef Data)
Decompressor(llvm::StringRef Data)
Declared at: llvm/include/llvm/Object/Decompressor.h:45
Parameters
- llvm::StringRef Data
¶llvm::Error consumeCompressedZLibHeader(
bool Is64Bit,
bool IsLittleEndian)
llvm::Error consumeCompressedZLibHeader(
bool Is64Bit,
bool IsLittleEndian)
Declared at: llvm/include/llvm/Object/Decompressor.h:47
Parameters
- bool Is64Bit
- bool IsLittleEndian
¶static Expected<llvm::object::Decompressor>
create(llvm::StringRef Name,
llvm::StringRef Data,
bool IsLE,
bool Is64Bit)
static Expected<llvm::object::Decompressor>
create(llvm::StringRef Name,
llvm::StringRef Data,
bool IsLE,
bool Is64Bit)
Description
Create decompressor object.
Declared at: llvm/include/llvm/Object/Decompressor.h:27
Parameters
- llvm::StringRef Name
- Section name.
- llvm::StringRef Data
- Section content.
- bool IsLE
- Flag determines if Data is in little endian form.
- bool Is64Bit
- Flag determines if object is 64 bit.
¶llvm::Error decompress(
MutableArrayRef<uint8_t> Buffer)
llvm::Error decompress(
MutableArrayRef<uint8_t> Buffer)
Description
Uncompress section data to raw buffer provided.
Declared at: llvm/include/llvm/Object/Decompressor.h:39
Parameters
- MutableArrayRef<uint8_t> Buffer
- Destination buffer.
¶uint64_t getDecompressedSize()
uint64_t getDecompressedSize()
Description
Return memory buffer size required for decompression.
Declared at: llvm/include/llvm/Object/Decompressor.h:42
¶template <class T>
llvm::Error resizeAndDecompress(T& Out)
template <class T>
llvm::Error resizeAndDecompress(T& Out)
Description
Resize the buffer and uncompress section data into it.
Declared at: llvm/include/llvm/Object/Decompressor.h:32
Templates
- T
Parameters
- T& Out
- Destination buffer.