1 **free 2 // ZLIB.INC - Interface to the general purpose compression library 3 4 // ILE RPG400 version by Patrick Monnerat, DATASPHERE. 5 // Version 1.3.2 6 7 8 // WARNING: 9 // Procedures inflateInit(), inflateInit2(), deflateInit(), 10 // deflateInit2() and inflateBackInit() need to be called with 11 // two additional arguments: 12 // the package version string and the stream control structure. 13 // size. This is needed because RPG lacks some macro feature. 14 // Call these procedures as: 15 // inflateInit(...: ZLIB_VERSION: %size(z_stream)) 16 17 /if not defined(ZLIB_H_) 18 /define ZLIB_H_ 19 20 //************************************************************************* 21 // Constants 22 //************************************************************************* 23 24 // Versioning information. 25 26 Dcl-C ZLIB_VERSION '1.3.2'; 27 Dcl-C ZLIB_VERNUM X'1320'; 28 Dcl-C ZLIB_VER_MAJOR 1; 29 Dcl-C ZLIB_VER_MINOR 3; 30 Dcl-C ZLIB_VER_REVISION 2; 31 Dcl-C ZLIB_VER_SUBREVISION 0; 32 33 // Other equates. 34 35 Dcl-C Z_NO_FLUSH 0; 36 Dcl-C Z_PARTIAL_FLUSH 1; 37 Dcl-C Z_SYNC_FLUSH 2; 38 Dcl-C Z_FULL_FLUSH 3; 39 Dcl-C Z_FINISH 4; 40 Dcl-C Z_BLOCK 5; 41 Dcl-C Z_TREES 6; 42 43 Dcl-C Z_OK 0; 44 Dcl-C Z_STREAM_END 1; 45 Dcl-C Z_NEED_DICT 2; 46 Dcl-C Z_ERRNO -1; 47 Dcl-C Z_STREAM_ERROR -2; 48 Dcl-C Z_DATA_ERROR -3; 49 Dcl-C Z_MEM_ERROR -4; 50 Dcl-C Z_BUF_ERROR -5; 51 Dcl-C Z_VERSION_ERROR -6; 52 53 Dcl-C Z_NO_COMPRESSION 0; 54 Dcl-C Z_BEST_SPEED 1; 55 Dcl-C Z_BEST_COMPRESSION 9; 56 Dcl-C Z_DEFAULT_COMPRESSION -1; 57 58 Dcl-C Z_FILTERED 1; 59 Dcl-C Z_HUFFMAN_ONLY 2; 60 Dcl-C Z_RLE 3; 61 Dcl-C Z_DEFAULT_STRATEGY 0; 62 63 Dcl-C Z_BINARY 0; 64 Dcl-C Z_ASCII 1; 65 Dcl-C Z_UNKNOWN 2; 66 67 Dcl-C Z_DEFLATED 8; 68 69 Dcl-C Z_NULL 0; 70 71 //************************************************************************* 72 // Types 73 //************************************************************************* 74 75 Dcl-S z_streamp Pointer; // Stream struct ptr 76 Dcl-S gzFile Pointer; // File pointer 77 Dcl-S gz_headerp Pointer; 78 Dcl-S z_off_t Int(10); // Stream offsets 79 Dcl-S z_off64_t Int(20); // Stream offsets 80 81 //************************************************************************* 82 // Structures 83 //************************************************************************* 84 85 // The GZIP encode/decode stream support structure. 86 87 Dcl-Ds z_stream Align Based(z_streamp); 88 zs_next_in Pointer; // Next input byte 89 zs_avail_in Uns(10); // Byte cnt at next_in 90 zs_total_in Uns(10); // Total bytes read 91 zs_next_out Pointer; // Output buffer ptr 92 zs_avail_out Uns(10); // Room left @ next_out 93 zs_total_out Uns(10); // Total bytes written 94 zs_msg Pointer; // Last errmsg or null 95 zs_state Pointer; // Internal state 96 zs_zalloc Pointer(*PROC); // Int. state allocator 97 zs_free Pointer(*PROC); // Int. state dealloc. 98 zs_opaque Pointer; // Private alloc. data 99 zs_data_type Int(10); // ASC/BIN best guess 100 zs_adler Uns(10); // Uncompr. adler32 val 101 *N Uns(10); // Reserved 102 *N Uns(10); // Ptr. alignment 103 End-Ds; 104 105 //************************************************************************* 106 // Utility function prototypes 107 //************************************************************************* 108 109 Dcl-Pr compress Int(10) Extproc('compress'); 110 dest Char(65535) Options(*VARSIZE); // Destination buffer 111 destLen Uns(10); // Destination length 112 source Char(65535) Const Options(*VARSIZE); // Source buffer 113 sourceLen Uns(10) Value; // Source length 114 End-Pr; 115 116 Dcl-Pr compress_z Int(10) Extproc('compress_z'); 117 dest Char(65535) Options(*VARSIZE); // Destination buffer 118 destLen Uns(20); // Destination length 119 source Char(65535) Const Options(*VARSIZE); // Source buffer 120 sourceLen Uns(20) Value; // Source length 121 End-Pr; 122 123 Dcl-Pr compress2 Int(10) Extproc('compress2'); 124 dest Char(65535) Options(*VARSIZE); // Destination buffer 125 destLen Uns(10); // Destination length 126 source Char(65535) Const Options(*VARSIZE); // Source buffer 127 sourceLen Uns(10) Value; // Source length 128 level Int(10) Value; // Compression level 129 End-Pr; 130 131 Dcl-Pr compress2_z Int(10) Extproc('compress2_z'); 132 dest Char(65535) Options(*VARSIZE); // Destination buffer 133 destLen Uns(20); // Destination length 134 source Char(65535) Const Options(*VARSIZE); // Source buffer 135 sourceLen Uns(20) Value; // Source length 136 level Int(10) Value; // Compression level 137 End-Pr; 138 139 Dcl-Pr compressBound Uns(10) Extproc('compressBound'); 140 sourceLen Uns(10) Value; 141 End-Pr; 142 143 Dcl-Pr compressBound_z Uns(10) Extproc('compressBound_z'); 144 sourceLen Uns(20) Value; 145 End-Pr; 146 147 Dcl-Pr uncompress Int(10) Extproc('uncompress'); 148 dest Char(65535) Options(*VARSIZE); // Destination buffer 149 destLen Uns(10); // Destination length 150 source Char(65535) Const Options(*VARSIZE); // Source buffer 151 sourceLen Uns(10) Value; // Source length 152 End-Pr; 153 154 Dcl-Pr uncompress_z Int(10) Extproc('uncompress_z'); 155 dest Char(65535) Options(*VARSIZE); // Destination buffer 156 destLen Uns(20); // Destination length 157 source Char(65535) Const Options(*VARSIZE); // Source buffer 158 sourceLen Uns(20) Value; // Source length 159 End-Pr; 160 161 Dcl-Pr uncompress2 Int(10) Extproc('uncompress2'); 162 dest Char(65535) Options(*VARSIZE); // Destination buffer 163 destLen Uns(10); // Destination length 164 source Char(65535) Const Options(*VARSIZE); // Source buffer 165 sourceLen Uns(10); // Source length 166 End-Pr; 167 168 Dcl-Pr uncompress2_z Int(10) Extproc('uncompress2_z'); 169 dest Char(65535) Options(*VARSIZE); // Destination buffer 170 destLen Uns(20); // Destination length 171 source Char(65535) Const Options(*VARSIZE); // Source buffer 172 sourceLen Uns(20); // Source length 173 End-Pr; 174 175 /if not defined(LARGE_FILES) 176 Dcl-Pr gzopen Extproc('gzopen') Like(gzFile); 177 path Pointer Value Options(*STRING); // File pathname 178 mode Pointer Value Options(*STRING); // Open mode 179 End-Pr; 180 /else 181 Dcl-Pr gzopen Extproc('gzopen64') Like(gzFile); 182 path Pointer Value Options(*STRING); // File pathname 183 mode Pointer Value Options(*STRING); // Open mode 184 End-Pr; 185 186 Dcl-Pr gzopen64 Extproc('gzopen64') Like(gzFile); 187 path Pointer Value Options(*STRING); // File pathname 188 mode Pointer Value Options(*STRING); // Open mode 189 End-Pr; 190 /endif 191 192 Dcl-Pr gzdopen Extproc('gzdopen') Like(gzFile); 193 fd Int(10) Value; // File descriptor 194 mode Pointer Value Options(*STRING); // Open mode 195 End-Pr; 196 197 Dcl-Pr gzbuffer Int(10) Extproc('gzbuffer'); 198 file Value Like(gzFile); // File pointer 199 size Uns(10) Value; 200 End-Pr; 201 202 Dcl-Pr gzsetparams Int(10) Extproc('gzsetparams'); 203 file Value Like(gzFile); // File pointer 204 level Int(10) Value; 205 strategy Int(10) Value; 206 End-Pr; 207 208 Dcl-Pr gzread Int(10) Extproc('gzread'); 209 file Value Like(gzFile); // File pointer 210 buf Char(65535) Options(*VARSIZE); // Buffer 211 len Uns(10) Value; // Buffer length 212 End-Pr; 213 214 Dcl-Pr gzfread Int(20) Extproc('gzfread'); 215 buf Char(65535) Options(*VARSIZE); // Buffer 216 size Uns(20) Value; // Buffer length 217 nitems Uns(20) Value; // Buffer length 218 file Value Like(gzFile); // File pointer 219 End-Pr; 220 221 Dcl-Pr gzwrite Int(10) Extproc('gzwrite'); 222 file Value Like(gzFile); // File pointer 223 buf Char(65535) Const Options(*VARSIZE); // Buffer 224 len Uns(10) Value; // Buffer length 225 End-Pr; 226 227 Dcl-Pr gzfwrite Int(20) Extproc('gzfwrite'); 228 buf Char(65535) Options(*VARSIZE); // Buffer 229 size Uns(20) Value; // Buffer length 230 nitems Uns(20) Value; // Buffer length 231 file Value Like(gzFile); // File pointer 232 End-Pr; 233 234 Dcl-Pr gzputs Int(10) Extproc('gzputs'); 235 file Value Like(gzFile); // File pointer 236 s Pointer Value Options(*STRING); // String to output 237 End-Pr; 238 239 Dcl-Pr gzgets Pointer Extproc('gzgets'); 240 file Value Like(gzFile); // File pointer 241 buf Char(65535) Options(*VARSIZE); // Read buffer 242 len Int(10) Value; // Buffer length 243 End-Pr; 244 245 Dcl-Pr gzputc Int(10) Extproc('gzputc'); 246 file Value Like(gzFile); // File pointer 247 c Int(10) Value; // Character to write 248 End-Pr; 249 250 Dcl-Pr gzgetc Int(10) Extproc('gzgetc'); 251 file Value Like(gzFile); // File pointer 252 End-Pr; 253 254 Dcl-Pr gzgetc_ Int(10) Extproc('gzgetc_'); 255 file Value Like(gzFile); // File pointer 256 End-Pr; 257 258 Dcl-Pr gzungetc Int(10) Extproc('gzungetc'); 259 c Int(10) Value; // Character to push 260 file Value Like(gzFile); // File pointer 261 End-Pr; 262 263 Dcl-Pr gzflush Int(10) Extproc('gzflush'); 264 file Value Like(gzFile); // File pointer 265 flush Int(10) Value; // Type of flush 266 End-Pr; 267 268 /if not defined(LARGE_FILES) 269 Dcl-Pr gzseek Extproc('gzseek') Like(z_off_t); 270 file Value Like(gzFile); // File pointer 271 offset Value Like(z_off_t); // Offset 272 whence Int(10) Value; // Origin 273 End-Pr; 274 /else 275 Dcl-Pr gzseek Extproc('gzseek64') Like(z_off_t); 276 file Value Like(gzFile); // File pointer 277 offset Value Like(z_off_t); // Offset 278 whence Int(10) Value; // Origin 279 End-Pr; 280 281 Dcl-Pr gzseek64 Extproc('gzseek64') Like(z_off64_t); 282 file Value Like(gzFile); // File pointer 283 offset Value Like(z_off64_t); // Offset 284 whence Int(10) Value; // Origin 285 End-Pr; 286 /endif 287 288 Dcl-Pr gzrewind Int(10) Extproc('gzrewind'); 289 file Value Like(gzFile); // File pointer 290 End-Pr; 291 292 /if not defined(LARGE_FILES) 293 Dcl-Pr gztell Extproc('gztell') Like(z_off_t); 294 file Value Like(gzFile); // File pointer 295 End-Pr; 296 /else 297 Dcl-Pr gztell Extproc('gztell64') Like(z_off_t); 298 file Value Like(gzFile); // File pointer 299 End-Pr; 300 301 Dcl-Pr gztell64 Extproc('gztell64') Like(z_off64_t); 302 file Value Like(gzFile); // File pointer 303 End-Pr; 304 /endif 305 306 /if not defined(LARGE_FILES) 307 Dcl-Pr gzoffset Extproc('gzoffset') Like(z_off_t); 308 file Value Like(gzFile); // File pointer 309 End-Pr; 310 /else 311 Dcl-Pr gzoffset Extproc('gzoffset64') Like(z_off_t); 312 file Value Like(gzFile); // File pointer 313 End-Pr; 314 315 Dcl-Pr gzoffset64 Extproc('gzoffset64') Like(z_off64_t); 316 file Value Like(gzFile); // File pointer 317 End-Pr; 318 /endif 319 320 Dcl-Pr gzeof Int(10) Extproc('gzeof'); 321 file Value Like(gzFile); // File pointer 322 End-Pr; 323 324 Dcl-Pr gzdirect Int(10) Extproc('gzdirect'); 325 file Value Like(gzFile); // File pointer 326 End-Pr; 327 328 Dcl-Pr gzclose_r Int(10) Extproc('gzclose_r'); 329 file Value Like(gzFile); // File pointer 330 End-Pr; 331 332 Dcl-Pr gzclose_w Int(10) Extproc('gzclose_w'); 333 file Value Like(gzFile); // File pointer 334 End-Pr; 335 336 Dcl-Pr gzclose Int(10) Extproc('gzclose'); 337 file Value Like(gzFile); // File pointer 338 End-Pr; 339 340 Dcl-Pr gzerror Pointer Extproc('gzerror'); // Error string 341 file Value Like(gzFile); // File pointer 342 errnum Int(10); // Error code 343 End-Pr; 344 345 Dcl-Pr gzclearerr Extproc('gzclearerr'); 346 file Value Like(gzFile); // File pointer 347 End-Pr; 348 349 //************************************************************************* 350 // Basic function prototypes 351 //************************************************************************* 352 353 Dcl-Pr zlibVersion Pointer Extproc('zlibVersion'); // Version string 354 End-Pr; 355 356 Dcl-Pr deflateInit Int(10) Extproc('deflateInit_'); // Init. compression 357 strm Like(z_stream); // Compression stream 358 level Int(10) Value; // Compression level 359 version Pointer Value Options(*STRING); // Version string 360 stream_size Int(10) Value; // Stream struct. size 361 End-Pr; 362 363 Dcl-Pr deflate Int(10) Extproc('deflate'); // Compress data 364 strm Like(z_stream); // Compression stream 365 flush Int(10) Value; // Flush type required 366 End-Pr; 367 368 Dcl-Pr deflateEnd Int(10) Extproc('deflateEnd'); // Termin. compression 369 strm Like(z_stream); // Compression stream 370 End-Pr; 371 372 Dcl-Pr inflateInit Int(10) Extproc('inflateInit_'); // Init. expansion 373 strm Like(z_stream); // Expansion stream 374 version Pointer Value Options(*STRING); // Version string 375 stream_size Int(10) Value; // Stream struct. size 376 End-Pr; 377 378 Dcl-Pr inflate Int(10) Extproc('inflate'); // Expand data 379 strm Like(z_stream); // Expansion stream 380 flush Int(10) Value; // Flush type required 381 End-Pr; 382 383 Dcl-Pr inflateEnd Int(10) Extproc('inflateEnd'); // Termin. expansion 384 strm Like(z_stream); // Expansion stream 385 End-Pr; 386 387 //************************************************************************* 388 // Advanced function prototypes 389 //************************************************************************* 390 391 Dcl-Pr deflateInit2 Int(10) Extproc('deflateInit2_'); // Init. compression 392 strm Like(z_stream); // Compression stream 393 level Int(10) Value; // Compression level 394 method Int(10) Value; // Compression method 395 windowBits Int(10) Value; // log2(window size) 396 memLevel Int(10) Value; // Mem/cmpress tradeoff 397 strategy Int(10) Value; // Compression strategy 398 version Pointer Value Options(*STRING); // Version string 399 stream_size Int(10) Value; // Stream struct. size 400 End-Pr; 401 402 Dcl-Pr deflateSetDictionary Int(10) Extproc('deflateSetDictionary'); // Init. dictionary 403 strm Like(z_stream); // Compression stream 404 dictionary Char(65535) Const Options(*VARSIZE); // Dictionary bytes 405 dictLength Uns(10) Value; // Dictionary length 406 End-Pr; 407 408 Dcl-Pr deflateCopy Int(10) Extproc('deflateCopy'); // Compress strm 2 strm 409 dest Like(z_stream); // Destination stream 410 source Like(z_stream); // Source stream 411 End-Pr; 412 413 Dcl-Pr deflateReset Int(10) Extproc('deflateReset'); // End and init. stream 414 strm Like(z_stream); // Compression stream 415 End-Pr; 416 417 Dcl-Pr deflateParams Int(10) Extproc('deflateParams'); // Change level & strat 418 strm Like(z_stream); // Compression stream 419 level Int(10) Value; // Compression level 420 strategy Int(10) Value; // Compression strategy 421 End-Pr; 422 423 Dcl-Pr deflateTune Int(10) Extproc('deflateTune'); 424 strm Like(z_stream); // Compression stream 425 good Int(10) Value; 426 lazy Int(10) Value; 427 nice Int(10) Value; 428 chain_ Int(10) Value; 429 End-Pr; 430 431 Dcl-Pr deflateBound Uns(10) Extproc('deflateBound'); // Change level & strat 432 strm Like(z_stream); // Compression stream 433 sourcelen Uns(10) Value; // Source length 434 End-Pr; 435 436 Dcl-Pr deflateBound_z Uns(10) Extproc('deflateBound_z'); // Change level & strat 437 strm Like(z_stream); // Compression stream 438 sourcelen Uns(20) Value; // Source length 439 End-Pr; 440 441 Dcl-Pr deflatePending Int(10) Extproc('deflatePending'); // Change level & strat 442 strm Like(z_stream); // Compression stream 443 pending Uns(10); // Pending bytes 444 bits Int(10); // Pending bits 445 End-Pr; 446 447 Dcl-Pr deflateUsed Int(10) Extproc('deflateUsed'); // Get used bits 448 strm Like(z_stream); // Compression stream 449 bits Int(10); // Used bits 450 End-Pr; 451 452 Dcl-Pr deflatePrime Int(10) Extproc('deflatePrime'); // Change level & strat 453 strm Like(z_stream); // Compression stream 454 bits Int(10) Value; // # of bits to insert 455 value Int(10) Value; // Bits to insert 456 End-Pr; 457 458 Dcl-Pr inflateInit2 Int(10) Extproc('inflateInit2_'); // Init. expansion 459 strm Like(z_stream); // Expansion stream 460 windowBits Int(10) Value; // log2(window size) 461 version Pointer Value Options(*STRING); // Version string 462 stream_size Int(10) Value; // Stream struct. size 463 End-Pr; 464 465 Dcl-Pr inflateSetDictionary Int(10) Extproc('inflateSetDictionary'); // Init. dictionary 466 strm Like(z_stream); // Expansion stream 467 dictionary Char(65535) Const Options(*VARSIZE); // Dictionary bytes 468 dictLength Uns(10) Value; // Dictionary length 469 End-Pr; 470 471 Dcl-Pr inflateGetDictionary Int(10) Extproc('inflateGetDictionary'); // Get dictionary 472 strm Like(z_stream); // Expansion stream 473 dictionary Char(65535) Options(*VARSIZE); // Dictionary bytes 474 dictLength Uns(10); // Dictionary length 475 End-Pr; 476 477 Dcl-Pr deflateGetDictionary Int(10) Extproc('deflateGetDictionary'); // Get dictionary 478 strm Like(z_stream); // Expansion stream 479 dictionary Char(65535) Options(*VARSIZE); // Dictionary bytes 480 dictLength Uns(10); // Dictionary length 481 End-Pr; 482 483 Dcl-Pr inflateSync Int(10) Extproc('inflateSync'); // Sync. expansion 484 strm Like(z_stream); // Expansion stream 485 End-Pr; 486 487 Dcl-Pr inflateCopy Int(10) Extproc('inflateCopy'); 488 dest Like(z_stream); // Destination stream 489 source Like(z_stream); // Source stream 490 End-Pr; 491 492 Dcl-Pr inflateReset Int(10) Extproc('inflateReset'); // End and init. stream 493 strm Like(z_stream); // Expansion stream 494 End-Pr; 495 496 Dcl-Pr inflateReset2 Int(10) Extproc('inflateReset2'); // End and init. stream 497 strm Like(z_stream); // Expansion stream 498 windowBits Int(10) Value; // Log2(buffer size) 499 End-Pr; 500 501 Dcl-Pr inflatePrime Int(10) Extproc('inflatePrime'); // Insert bits 502 strm Like(z_stream); // Expansion stream 503 bits Int(10) Value; // Bit count 504 value Int(10) Value; // Bits to insert 505 End-Pr; 506 507 Dcl-Pr inflateMark Int(10) Extproc('inflateMark'); // Get inflate info 508 strm Like(z_stream); // Expansion stream 509 End-Pr; 510 511 Dcl-Pr inflateCodesUsed Uns(20) Extproc('inflateCodesUsed'); 512 strm Like(z_stream); // Expansion stream 513 End-Pr; 514 515 Dcl-Pr inflateValidate Uns(20) Extproc('inflateValidate'); 516 strm Like(z_stream); // Expansion stream 517 check Int(10) Value; 518 End-Pr; 519 520 Dcl-Pr inflateGetHeader Uns(10) Extproc('inflateGetHeader'); 521 strm Like(z_stream); // Expansion stream 522 head Like(GZ_HEADERP); 523 End-Pr; 524 525 Dcl-Pr deflateSetHeader Uns(10) Extproc('deflateSetHeader'); 526 strm Like(z_stream); // Expansion stream 527 head Like(GZ_HEADERP); 528 End-Pr; 529 530 Dcl-Pr inflateBackInit Int(10) Extproc('inflateBackInit_'); 531 strm Like(z_stream); // Expansion stream 532 windowBits Int(10) Value; // Log2(buffer size) 533 window Char(65535) Options(*VARSIZE); // Buffer 534 version Pointer Value Options(*STRING); // Version string 535 stream_size Int(10) Value; // Stream struct. size 536 End-Pr; 537 538 Dcl-Pr inflateBack Int(10) Extproc('inflateBack'); 539 strm Like(z_stream); // Expansion stream 540 in_ Pointer(*PROC) Value; // Input function 541 in_desc Pointer Value; // Input descriptor 542 out_ Pointer(*PROC) Value; // Output function 543 out_desc Pointer Value; // Output descriptor 544 End-Pr; 545 546 Dcl-Pr inflateBackEnd Int(10) Extproc('inflateBackend'); 547 strm Like(z_stream); // Expansion stream 548 End-Pr; 549 550 Dcl-Pr zlibCompileFlags Uns(10) Extproc('zlibCompileFlags') End-Pr; 551 552 //************************************************************************* 553 // Checksum function prototypes 554 //************************************************************************* 555 556 Dcl-Pr adler32 Uns(10) Extproc('adler32'); // New checksum 557 adler Uns(10) Value; // Old checksum 558 buf Char(65535) Const Options(*VARSIZE); // Bytes to accumulate 559 len Uns(10) Value; // Buffer length 560 End-Pr; 561 562 Dcl-Pr adler32_combine Uns(10) Extproc('adler32_combine'); // New checksum 563 adler1 Uns(10) Value; // Old checksum 564 adler2 Uns(10) Value; // Old checksum 565 len2 Uns(20) Value; // Buffer length 566 End-Pr; 567 568 Dcl-Pr adler32_z Uns(10) Extproc('adler32_z'); // New checksum 569 adler Uns(10) Value; // Old checksum 570 buf Char(65535) Const Options(*VARSIZE); // Bytes to accumulate 571 len Uns(20) Value; // Buffer length 572 End-Pr; 573 574 Dcl-Pr crc32 Uns(10) Extproc('crc32'); // New checksum 575 crc Uns(10) Value; // Old checksum 576 buf Char(65535) Const Options(*VARSIZE); // Bytes to accumulate 577 len Uns(10) Value; // Buffer length 578 End-Pr; 579 580 Dcl-Pr crc32_combine Uns(10) Extproc('crc32_combine'); // New checksum 581 crc1 Uns(10) Value; // Old checksum 582 crc2 Uns(10) Value; // Old checksum 583 len2 Uns(20) Value; // 2nd Buffer length 584 End-Pr; 585 586 Dcl-Pr crc32_z Uns(10) Extproc('crc32_z'); // New checksum 587 crc Uns(10) Value; // Old checksum 588 buf Char(65535) Const Options(*VARSIZE); // Bytes to accumulate 589 len Uns(20) Value; // Buffer length 590 End-Pr; 591 592 Dcl-Pr crc32_combine_gen Uns(10) Extproc('crc32_combine_gen'); 593 len Uns(20) Value; // 2nd Buffer length 594 End-Pr; 595 596 Dcl-Pr crc32_combine_gen64 Uns(10) Extproc('crc32_combine_gen64'); 597 len Uns(20) Value; // 2nd Buffer length 598 End-Pr; 599 600 Dcl-Pr crc32_combine_op Uns(10) Extproc('crc32_combine_op'); // New checksum 601 crc1 Uns(10) Value; // Old checksum 602 crc2 Uns(10) Value; // Old checksum 603 op Uns(10) Value; // Operator 604 End-Pr; 605 606 //************************************************************************* 607 // Miscellaneous function prototypes 608 //************************************************************************* 609 610 Dcl-Pr zError Pointer Extproc('zError'); // Error string 611 err Int(10) Value; // Error code 612 End-Pr; 613 614 Dcl-Pr inflateSyncPoint Int(10) Extproc('inflateSyncPoint'); 615 strm Like(z_stream); // Expansion stream 616 End-Pr; 617 618 Dcl-Pr get_crc_table Pointer Extproc('get_crc_table'); // Ptr to ulongs 619 End-Pr; 620 621 Dcl-Pr inflateUndermine Int(10) Extproc('inflateUndermine'); 622 strm Like(z_stream); // Expansion stream 623 arg Int(10) Value; // Error code 624 End-Pr; 625 626 Dcl-Pr inflateResetKeep Int(10) Extproc('inflateResetKeep'); // End and init. stream 627 strm Like(z_stream); // Expansion stream 628 End-Pr; 629 630 Dcl-Pr deflateResetKeep Int(10) Extproc('deflateResetKeep'); // End and init. stream 631 strm Like(z_stream); // Expansion stream 632 End-Pr; 633 634 /endif 635