aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Compression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/Compression.cpp')
-rw-r--r--llvm/lib/Support/Compression.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Support/Compression.cpp b/llvm/lib/Support/Compression.cpp
index 529e617..8e57ba7 100644
--- a/llvm/lib/Support/Compression.cpp
+++ b/llvm/lib/Support/Compression.cpp
@@ -55,6 +55,17 @@ void compression::compress(Params P, ArrayRef<uint8_t> Input,
}
}
+Error compression::decompress(DebugCompressionType T, ArrayRef<uint8_t> Input,
+ uint8_t *Output, size_t UncompressedSize) {
+ switch (formatFor(T)) {
+ case compression::Format::Zlib:
+ return zlib::decompress(Input, Output, UncompressedSize);
+ case compression::Format::Zstd:
+ return zstd::decompress(Input, Output, UncompressedSize);
+ }
+ llvm_unreachable("");
+}
+
Error compression::decompress(compression::Format F, ArrayRef<uint8_t> Input,
SmallVectorImpl<uint8_t> &Output,
size_t UncompressedSize) {