LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::object::Decompressor Class Reference

Decompressor helps to handle decompression of compressed sections. More...

#include "llvm/Object/Decompressor.h"

Public Member Functions

template<class T >
Error resizeAndDecompress (T &Out)
 Resize the buffer and uncompress section data into it.
 
Error decompress (MutableArrayRef< uint8_t > Output)
 Uncompress section data to raw buffer provided.
 
uint64_t getDecompressedSize ()
 Return memory buffer size required for decompression.
 

Static Public Member Functions

static Expected< Decompressorcreate (StringRef Name, StringRef Data, bool IsLE, bool Is64Bit)
 Create decompressor object.
 

Detailed Description

Decompressor helps to handle decompression of compressed sections.

Definition at line 21 of file Decompressor.h.

Member Function Documentation

◆ create()

Expected< Decompressor > Decompressor::create ( StringRef  Name,
StringRef  Data,
bool  IsLE,
bool  Is64Bit 
)
static

Create decompressor object.

Parameters
NameSection name.
DataSection content.
IsLEFlag determines if Data is in little endian form.
Is64BitFlag determines if object is 64 bit.

Definition at line 21 of file Decompressor.cpp.

References D, and llvm::Data.

Referenced by handleCompressedSection().

◆ decompress()

Error Decompressor::decompress ( MutableArrayRef< uint8_t >  Output)

Uncompress section data to raw buffer provided.

Definition at line 66 of file Decompressor.cpp.

References llvm::MutableArrayRef< T >::data(), llvm::compression::decompress(), and llvm::ArrayRef< T >::size().

Referenced by resizeAndDecompress().

◆ getDecompressedSize()

uint64_t llvm::object::Decompressor::getDecompressedSize ( )
inline

Return memory buffer size required for decompression.

Definition at line 42 of file Decompressor.h.

◆ resizeAndDecompress()

template<class T >
Error llvm::object::Decompressor::resizeAndDecompress ( T Out)
inline

Resize the buffer and uncompress section data into it.

Parameters
OutDestination buffer.

Definition at line 33 of file Decompressor.h.

References decompress().


The documentation for this class was generated from the following files: