Lines Matching +full:zlib +full:- +full:level
1 //===- llvm/unittest/Support/CompressionTest.cpp - Compression tests ------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
26 void TestZlibCompression(StringRef Input, int Level) { in TestZlibCompression() argument
30 Error E = zlib::compress(Input, Compressed, Level); in TestZlibCompression()
35 E = zlib::uncompress(Compressed, Uncompressed, Input.size()); in TestZlibCompression()
42 E = zlib::uncompress(Compressed, Uncompressed, Input.size() - 1); in TestZlibCompression()
43 EXPECT_EQ("zlib error: Z_BUF_ERROR", llvm::toString(std::move(E))); in TestZlibCompression()
47 TEST(CompressionTest, Zlib) { in TEST() argument
48 TestZlibCompression("", zlib::DefaultCompression); in TEST()
50 TestZlibCompression("hello, world!", zlib::NoCompression); in TEST()
51 TestZlibCompression("hello, world!", zlib::BestSizeCompression); in TEST()
52 TestZlibCompression("hello, world!", zlib::BestSpeedCompression); in TEST()
53 TestZlibCompression("hello, world!", zlib::DefaultCompression); in TEST()
62 TestZlibCompression(BinaryDataStr, zlib::NoCompression); in TEST()
63 TestZlibCompression(BinaryDataStr, zlib::BestSizeCompression); in TEST()
64 TestZlibCompression(BinaryDataStr, zlib::BestSpeedCompression); in TEST()
65 TestZlibCompression(BinaryDataStr, zlib::DefaultCompression); in TEST()
71 zlib::crc32(StringRef("The quick brown fox jumps over the lazy dog"))); in TEST()