Lines Matching refs:uncompr
62 static void test_compress(Byte *compr, uLong comprLen, Byte *uncompr,
71 strcpy((char*)uncompr, "garbage");
73 err = uncompress(uncompr, &uncomprLen, compr, comprLen);
76 if (strcmp((char*)uncompr, hello)) {
80 printf("uncompress(): %s\n", (char *)uncompr);
87 static void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen)
119 strcpy((char*)uncompr, "garbage");
121 if (gzread(file, uncompr, (unsigned)uncomprLen) != len) {
125 if (strcmp((char*)uncompr, hello)) {
126 fprintf(stderr, "bad gzread: %s\n", (char*)uncompr);
129 printf("gzread(): %s\n", (char*)uncompr);
149 gzgets(file, (char*)uncompr, (int)uncomprLen);
150 if (strlen((char*)uncompr) != 7) { /* " hello!" */
154 if (strcmp((char*)uncompr, hello + 6)) {
158 printf("gzgets() after gzseek: %s\n", (char*)uncompr);
209 static void test_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
215 strcpy((char*)uncompr, "garbage");
223 d_stream.next_out = uncompr;
241 if (strcmp((char*)uncompr, hello)) {
245 printf("inflate(): %s\n", (char *)uncompr);
252 static void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr,
268 /* At this point, uncompr is still mostly zeroes, so it should compress
271 c_stream.next_in = uncompr;
289 c_stream.next_in = uncompr;
306 static void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
312 strcpy((char*)uncompr, "garbage");
325 d_stream.next_out = uncompr; /* discard the output */
385 static void test_sync(Byte *compr, uLong comprLen, Byte *uncompr,
391 strcpy((char*)uncompr, "garbage");
403 d_stream.next_out = uncompr;
421 printf("after inflateSync(): hel%s\n", (char *)uncompr);
462 static void test_dict_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
468 strcpy((char*)uncompr, "garbage");
480 d_stream.next_out = uncompr;
503 if (strcmp((char*)uncompr, hello)) {
507 printf("inflate with dictionary: %s\n", (char *)uncompr);
517 Byte *compr, *uncompr;
535 uncompr = (Byte*)calloc((uInt)uncomprLen, 1);
536 /* compr and uncompr are cleared to avoid reading uninitialized
537 * data and to ensure that uncompr compresses well.
539 if (compr == Z_NULL || uncompr == Z_NULL) {
548 test_compress(compr, comprLen, uncompr, uncomprLen);
551 uncompr, uncomprLen);
555 test_inflate(compr, comprLen, uncompr, uncomprLen);
557 test_large_deflate(compr, comprLen, uncompr, uncomprLen);
558 test_large_inflate(compr, comprLen, uncompr, uncomprLen);
561 test_sync(compr, comprLen, uncompr, uncomprLen);
565 test_dict_inflate(compr, comprLen, uncompr, uncomprLen);
568 free(uncompr);