Lines Matching defs:in
5 // you may not use this file except in compliance with the License.
10 // Unless required by applicable law or agreed to in writing, software
71 bool DecompressWithWriter(const brillo::Blob& in, brillo::Blob* out) {
76 TEST_AND_RETURN_FALSE(writer->Write(in.data(), in.size()));
86 bool ZipCompress(const brillo::Blob& in, brillo::Blob* out) const = 0;
87 bool ZipDecompress(const brillo::Blob& in, brillo::Blob* out) const = 0;
95 bool ZipCompress(const brillo::Blob& in, brillo::Blob* out) const {
96 return BzipCompress(in, out);
98 bool ZipDecompress(const brillo::Blob& in, brillo::Blob* out) const {
99 return DecompressWithWriter<BzipExtentWriter>(in, out);
108 bool ZipCompress(const brillo::Blob& in, brillo::Blob* out) const {
109 return XzCompress(in, out);
111 bool ZipDecompress(const brillo::Blob& in, brillo::Blob* out) const {
112 return DecompressWithWriter<XzExtentWriter>(in, out);
133 brillo::Blob in(in_str.begin(), in_str.end());
135 EXPECT_TRUE(this->ZipCompress(in, &out));
136 EXPECT_LT(out.size(), in.size());
140 EXPECT_EQ(in.size(), decompressed.size());
141 EXPECT_TRUE(!memcmp(in.data(), decompressed.data(), in.size()));
145 brillo::Blob in(std::begin(kRandomString), std::end(kRandomString));
147 EXPECT_TRUE(this->ZipCompress(in, &out));
148 EXPECT_GT(out.size(), in.size());
151 EXPECT_EQ(in.size(), decompressed.size());
152 EXPECT_EQ(in, decompressed);
156 brillo::Blob in(std::begin(kRandomString), std::end(kRandomString));
158 EXPECT_FALSE(this->ZipDecompress(in, &out));
162 brillo::Blob in;
164 EXPECT_TRUE(this->ZipDecompress(in, &out));
167 EXPECT_TRUE(this->ZipCompress(in, &out));