Lines Matching refs:zlib
26 void TestZlibCompression(StringRef Input, zlib::CompressionLevel Level) {
29 EXPECT_EQ(zlib::StatusOK, zlib::compress(Input, Compressed, Level));
31 EXPECT_EQ(zlib::StatusOK,
32 zlib::uncompress(Compressed, Uncompressed, Input.size()));
36 EXPECT_EQ(zlib::StatusBufferTooShort,
37 zlib::uncompress(Compressed, Uncompressed, Input.size() - 1));
41 TEST(CompressionTest, Zlib) {
42 TestZlibCompression("", zlib::DefaultCompression);
44 TestZlibCompression("hello, world!", zlib::NoCompression);
45 TestZlibCompression("hello, world!", zlib::BestSizeCompression);
46 TestZlibCompression("hello, world!", zlib::BestSpeedCompression);
47 TestZlibCompression("hello, world!", zlib::DefaultCompression);
56 TestZlibCompression(BinaryDataStr, zlib::NoCompression);
57 TestZlibCompression(BinaryDataStr, zlib::BestSizeCompression);
58 TestZlibCompression(BinaryDataStr, zlib::BestSpeedCompression);
59 TestZlibCompression(BinaryDataStr, zlib::DefaultCompression);
65 zlib::crc32(StringRef("The quick brown fox jumps over the lazy dog")));