1 //===-- llvm/Support/Compression.h ---Compression----------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains basic functions for compression/uncompression.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_SUPPORT_COMPRESSION_H
15 #define LLVM_SUPPORT_COMPRESSION_H
17 #include "llvm/Support/DataTypes.h"
20 template <typename T> class SmallVectorImpl;
26 enum CompressionLevel {
35 Error compress(StringRef InputBuffer, SmallVectorImpl<char> &CompressedBuffer,
36 CompressionLevel Level = DefaultCompression);
38 Error uncompress(StringRef InputBuffer, char *UncompressedBuffer,
39 size_t &UncompressedSize);
41 Error uncompress(StringRef InputBuffer,
42 SmallVectorImpl<char> &UncompressedBuffer,
43 size_t UncompressedSize);
45 uint32_t crc32(StringRef Buffer);
47 } // End of namespace zlib
49 } // End of namespace llvm