LLVM  6.0.0svn
Compression.h
Go to the documentation of this file.
1 //===-- llvm/Support/Compression.h ---Compression----------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains basic functions for compression/uncompression.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_SUPPORT_COMPRESSION_H
15 #define LLVM_SUPPORT_COMPRESSION_H
16 
17 #include "llvm/Support/DataTypes.h"
18 
19 namespace llvm {
20 template <typename T> class SmallVectorImpl;
21 class Error;
22 class StringRef;
23 
24 namespace zlib {
25 
31 };
32 
33 bool isAvailable();
34 
35 Error compress(StringRef InputBuffer, SmallVectorImpl<char> &CompressedBuffer,
37 
38 Error uncompress(StringRef InputBuffer, char *UncompressedBuffer,
39  size_t &UncompressedSize);
40 
41 Error uncompress(StringRef InputBuffer,
42  SmallVectorImpl<char> &UncompressedBuffer,
43  size_t UncompressedSize);
44 
45 uint32_t crc32(StringRef Buffer);
46 
47 } // End of namespace zlib
48 
49 } // End of namespace llvm
50 
51 #endif
52 
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
bool isAvailable()
Definition: Compression.cpp:58
Error compress(StringRef InputBuffer, SmallVectorImpl< char > &CompressedBuffer, CompressionLevel Level=DefaultCompression)
Definition: Compression.cpp:60
uint32_t crc32(StringRef Buffer)
Definition: Compression.cpp:97
Lightweight error class with error context and mandatory checking.
Definition: Error.h:156
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
Error uncompress(StringRef InputBuffer, char *UncompressedBuffer, size_t &UncompressedSize)
Definition: Compression.cpp:76