Lines Matching refs:uncompr
60 static void test_compress(Byte *compr, uLong comprLen, Byte *uncompr,
68 strcpy((char*)uncompr, "garbage");
70 err = uncompress(uncompr, &uncomprLen, compr, comprLen);
73 if (strcmp((char*)uncompr, hello)) {
77 printf("uncompress(): %s\n", (char *)uncompr);
84 static void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen) {
115 strcpy((char*)uncompr, "garbage");
117 if (gzread(file, uncompr, (unsigned)uncomprLen) != len) {
121 if (strcmp((char*)uncompr, hello)) {
122 fprintf(stderr, "bad gzread: %s\n", (char*)uncompr);
125 printf("gzread(): %s\n", (char*)uncompr);
145 gzgets(file, (char*)uncompr, (int)uncomprLen);
146 if (strlen((char*)uncompr) != 7) { /* " hello!" */
150 if (strcmp((char*)uncompr, hello + 6)) {
154 printf("gzgets() after gzseek: %s\n", (char*)uncompr);
201 static void test_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
206 strcpy((char*)uncompr, "garbage");
214 d_stream.next_out = uncompr;
229 if (strcmp((char*)uncompr, hello)) {
233 printf("inflate(): %s\n", (char *)uncompr);
240 static void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr,
255 /* At this point, uncompr is still mostly zeroes, so it should compress
258 c_stream.next_in = uncompr;
276 c_stream.next_in = uncompr;
293 static void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
298 strcpy((char*)uncompr, "garbage");
311 d_stream.next_out = uncompr; /* discard the output */
367 static void test_sync(Byte *compr, uLong comprLen, Byte *uncompr,
372 strcpy((char*)uncompr, "garbage");
384 d_stream.next_out = uncompr;
402 printf("after inflateSync(): hel%s\n", (char *)uncompr);
442 static void test_dict_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
447 strcpy((char*)uncompr, "garbage");
459 d_stream.next_out = uncompr;
479 if (strcmp((char*)uncompr, hello)) {
483 printf("inflate with dictionary: %s\n", (char *)uncompr);
492 Byte *compr, *uncompr;
510 uncompr = (Byte*)calloc((uInt)uncomprLen, 1);
511 /* compr and uncompr are cleared to avoid reading uninitialized
512 * data and to ensure that uncompr compresses well.
514 if (compr == Z_NULL || uncompr == Z_NULL) {
523 test_compress(compr, comprLen, uncompr, uncomprLen);
526 uncompr, uncomprLen);
530 test_inflate(compr, comprLen, uncompr, uncomprLen);
532 test_large_deflate(compr, comprLen, uncompr, uncomprLen);
533 test_large_inflate(compr, comprLen, uncompr, uncomprLen);
536 test_sync(compr, comprLen, uncompr, uncomprLen);
540 test_dict_inflate(compr, comprLen, uncompr, uncomprLen);
543 free(uncompr);