|
LLVM
4.0.0
|
Decompressor helps to handle decompression of compressed sections. More...
#include <Decompressor.h>
Public Member Functions | |
| Error | decompress (SmallString< 32 > &Out) |
| Resize the buffer and uncompress section data into it. More... | |
| Error | decompress (MutableArrayRef< char > Buffer) |
| Uncompress section data to raw buffer provided. More... | |
| uint64_t | getDecompressedSize () |
| Return memory buffer size required for decompression. More... | |
Static Public Member Functions | |
| static Expected< Decompressor > | create (StringRef Name, StringRef Data, bool IsLE, bool Is64Bit) |
| Create decompressor object. More... | |
| static bool | isCompressed (const object::SectionRef &Section) |
| Return true if section is compressed, including gnu-styled case. More... | |
| static bool | isCompressedELFSection (uint64_t Flags, StringRef Name) |
| Return true if section is a ELF compressed one. More... | |
| static bool | isGnuStyle (StringRef Name) |
| Return true if section name matches gnu style compressed one. More... | |
Decompressor helps to handle decompression of compressed sections.
Definition at line 21 of file Decompressor.h.
|
static |
Create decompressor object.
| Name | Section name. |
| Data | Section content. |
| IsLE | Flag determines if Data is in little endian form. |
| Is64Bit | Flag determines if object is 64 bit. |
Definition at line 21 of file Decompressor.cpp.
References llvm::object::createError(), D, and llvm::zlib::isAvailable().
Referenced by llvm::DWARFContextInMemory::DWARFContextInMemory().
| Error Decompressor::decompress | ( | SmallString< 32 > & | Out | ) |
Resize the buffer and uncompress section data into it.
| Out | Destination buffer. |
Definition at line 91 of file Decompressor.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::data(), and llvm::SmallVectorImpl< T >::resize().
| Error Decompressor::decompress | ( | MutableArrayRef< char > | Buffer | ) |
Uncompress section data to raw buffer provided.
| Buffer | Destination buffer. |
Definition at line 96 of file Decompressor.cpp.
References llvm::object::createError(), llvm::MutableArrayRef< T >::data(), llvm::ArrayRef< T >::size(), llvm::zlib::StatusOK, llvm::Error::success(), and llvm::zlib::uncompress().
|
inline |
Return memory buffer size required for decompression.
Definition at line 40 of file Decompressor.h.
|
static |
Return true if section is compressed, including gnu-styled case.
Definition at line 80 of file Decompressor.cpp.
References llvm::object::SectionRef::getName(), llvm::object::SectionRef::isCompressed(), and isGnuStyle().
Referenced by llvm::DWARFContextInMemory::DWARFContextInMemory().
Return true if section is a ELF compressed one.
Definition at line 87 of file Decompressor.cpp.
References isGnuStyle(), and llvm::ELF::SHF_COMPRESSED.
Return true if section name matches gnu style compressed one.
Definition at line 76 of file Decompressor.cpp.
References llvm::StringRef::startswith().
Referenced by isCompressed(), and isCompressedELFSection().
1.8.6