diff options
Diffstat (limited to 'contrib/llvm-project/llvm/include/llvm/Support/Compression.h')
-rw-r--r-- | contrib/llvm-project/llvm/include/llvm/Support/Compression.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/Support/Compression.h b/contrib/llvm-project/llvm/include/llvm/Support/Compression.h index c99f811459ab..8500396d88a0 100644 --- a/contrib/llvm-project/llvm/include/llvm/Support/Compression.h +++ b/contrib/llvm-project/llvm/include/llvm/Support/Compression.h @@ -19,7 +19,6 @@ namespace llvm { template <typename T> class SmallVectorImpl; class Error; -class StringRef; namespace compression { namespace zlib { @@ -44,6 +43,28 @@ Error uncompress(ArrayRef<uint8_t> Input, } // End of namespace zlib +namespace zstd { + +constexpr int NoCompression = -5; +constexpr int BestSpeedCompression = 1; +constexpr int DefaultCompression = 5; +constexpr int BestSizeCompression = 12; + +bool isAvailable(); + +void compress(ArrayRef<uint8_t> Input, + SmallVectorImpl<uint8_t> &CompressedBuffer, + int Level = DefaultCompression); + +Error uncompress(ArrayRef<uint8_t> Input, uint8_t *UncompressedBuffer, + size_t &UncompressedSize); + +Error uncompress(ArrayRef<uint8_t> Input, + SmallVectorImpl<uint8_t> &UncompressedBuffer, + size_t UncompressedSize); + +} // End of namespace zstd + } // End of namespace compression } // End of namespace llvm |