Lines Matching refs:uncompr
66 static void test_compress(Byte *compr, uLong comprLen, Byte *uncompr, in test_compress() argument
74 strcpy((char*)uncompr, "garbage"); in test_compress()
76 err = uncompress(uncompr, &uncomprLen, compr, comprLen); in test_compress()
79 if (strcmp((char*)uncompr, hello)) { in test_compress()
83 printf("uncompress(): %s\n", (char *)uncompr); in test_compress()
90 static void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen) { in test_gzio() argument
121 strcpy((char*)uncompr, "garbage"); in test_gzio()
123 if (gzread(file, uncompr, (unsigned)uncomprLen) != len) { in test_gzio()
127 if (strcmp((char*)uncompr, hello)) { in test_gzio()
128 fprintf(stderr, "bad gzread: %s\n", (char*)uncompr); in test_gzio()
131 printf("gzread(): %s\n", (char*)uncompr); in test_gzio()
151 gzgets(file, (char*)uncompr, (int)uncomprLen); in test_gzio()
152 if (strlen((char*)uncompr) != 7) { /* " hello!" */ in test_gzio()
156 if (strcmp((char*)uncompr, hello + 6)) { in test_gzio()
160 printf("gzgets() after gzseek: %s\n", (char*)uncompr); in test_gzio()
207 static void test_inflate(Byte *compr, uLong comprLen, Byte *uncompr, in test_inflate() argument
212 strcpy((char*)uncompr, "garbage"); in test_inflate()
220 d_stream.next_out = uncompr; in test_inflate()
235 if (strcmp((char*)uncompr, hello)) { in test_inflate()
239 printf("inflate(): %s\n", (char *)uncompr); in test_inflate()
246 static void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr, in test_large_deflate() argument
264 c_stream.next_in = uncompr; in test_large_deflate()
282 c_stream.next_in = uncompr; in test_large_deflate()
299 static void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr, in test_large_inflate() argument
304 strcpy((char*)uncompr, "garbage"); in test_large_inflate()
317 d_stream.next_out = uncompr; /* discard the output */ in test_large_inflate()
373 static void test_sync(Byte *compr, uLong comprLen, Byte *uncompr, in test_sync() argument
378 strcpy((char*)uncompr, "garbage"); in test_sync()
390 d_stream.next_out = uncompr; in test_sync()
408 printf("after inflateSync(): hel%s\n", (char *)uncompr); in test_sync()
448 static void test_dict_inflate(Byte *compr, uLong comprLen, Byte *uncompr, in test_dict_inflate() argument
453 strcpy((char*)uncompr, "garbage"); in test_dict_inflate()
465 d_stream.next_out = uncompr; in test_dict_inflate()
485 if (strcmp((char*)uncompr, hello)) { in test_dict_inflate()
489 printf("inflate with dictionary: %s\n", (char *)uncompr); in test_dict_inflate()
498 Byte *compr, *uncompr; in main() local
516 uncompr = (Byte*)calloc((uInt)uncomprLen, 1); in main()
520 if (compr == Z_NULL || uncompr == Z_NULL) { in main()
529 test_compress(compr, comprLen, uncompr, uncomprLen); in main()
532 uncompr, uncomprLen); in main()
536 test_inflate(compr, comprLen, uncompr, uncomprLen); in main()
538 test_large_deflate(compr, comprLen, uncompr, uncomprLen); in main()
539 test_large_inflate(compr, comprLen, uncompr, uncomprLen); in main()
542 test_sync(compr, comprLen, uncompr, uncomprLen); in main()
546 test_dict_inflate(compr, comprLen, uncompr, uncomprLen); in main()
549 free(uncompr); in main()