zstdlib 0.11.0-x64-mingw32 → 0.13.0-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +16 -0
  3. data/Rakefile +1 -1
  4. data/ext/zstdlib_c/extconf.rb +9 -4
  5. data/ext/zstdlib_c/ruby/zlib-3.3/zstdlib.c +5090 -0
  6. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/adler32.c +5 -27
  7. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/compress.c +5 -16
  8. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/crc32.c +94 -161
  9. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/deflate.c +362 -434
  10. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/deflate.h +43 -12
  11. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzclose.c +1 -3
  12. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzguts.h +13 -18
  13. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzlib.c +28 -85
  14. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzread.c +23 -73
  15. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzwrite.c +19 -65
  16. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/infback.c +17 -30
  17. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inffast.c +1 -4
  18. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inffast.h +1 -1
  19. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inflate.c +36 -102
  20. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inftrees.c +6 -11
  21. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inftrees.h +6 -6
  22. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/trees.c +290 -355
  23. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/uncompr.c +4 -12
  24. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/zconf.h +23 -14
  25. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/zlib.h +202 -199
  26. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/zutil.c +18 -44
  27. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/zutil.h +13 -33
  28. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/allocations.h +1 -1
  29. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/bitstream.h +49 -29
  30. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/compiler.h +114 -22
  31. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/cpu.h +36 -0
  32. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/debug.c +6 -0
  33. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/debug.h +20 -11
  34. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/error_private.h +45 -36
  35. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/fse.h +3 -2
  36. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/fse_decompress.c +19 -17
  37. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/huf.h +14 -1
  38. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/mem.h +0 -9
  39. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/pool.c +1 -1
  40. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/pool.h +1 -1
  41. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/portability_macros.h +2 -0
  42. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/threading.c +8 -2
  43. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/xxhash.c +5 -11
  44. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/xxhash.h +2341 -1007
  45. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/zstd_internal.h +5 -5
  46. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/fse_compress.c +8 -7
  47. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/huf_compress.c +54 -25
  48. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress.c +282 -161
  49. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress_internal.h +29 -27
  50. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress_superblock.c +224 -113
  51. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_cwksp.h +19 -13
  52. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_double_fast.c +17 -5
  53. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_double_fast.h +11 -0
  54. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_fast.c +14 -6
  55. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_lazy.c +129 -87
  56. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_lazy.h +103 -28
  57. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_ldm.c +8 -2
  58. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_opt.c +216 -112
  59. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_opt.h +31 -7
  60. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstdmt_compress.c +94 -79
  61. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/huf_decompress.c +188 -126
  62. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/huf_decompress_amd64.S +38 -19
  63. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/zstd_decompress.c +84 -32
  64. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/zstd_decompress_block.c +231 -208
  65. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/zstd_decompress_block.h +1 -1
  66. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/zstd_decompress_internal.h +2 -0
  67. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/zstd.h +129 -60
  68. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/gzclose.c +1 -3
  69. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/gzlib.c +20 -73
  70. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/gzread.c +17 -58
  71. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/gzwrite.c +18 -58
  72. data/lib/2.4/zstdlib_c.so +0 -0
  73. data/lib/2.5/zstdlib_c.so +0 -0
  74. data/lib/2.6/zstdlib_c.so +0 -0
  75. data/lib/2.7/zstdlib_c.so +0 -0
  76. data/lib/3.0/zstdlib_c.so +0 -0
  77. metadata +103 -102
  78. /data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/crc32.h +0 -0
  79. /data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inffixed.h +0 -0
  80. /data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inflate.h +0 -0
  81. /data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/trees.h +0 -0
  82. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/bits.h +0 -0
  83. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/entropy_common.c +0 -0
  84. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/error_private.c +0 -0
  85. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/threading.h +0 -0
  86. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/zstd_common.c +0 -0
  87. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/zstd_deps.h +0 -0
  88. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/zstd_trace.h +0 -0
  89. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/clevels.h +0 -0
  90. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/hist.c +0 -0
  91. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/hist.h +0 -0
  92. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress_literals.c +0 -0
  93. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress_literals.h +0 -0
  94. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress_sequences.c +0 -0
  95. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress_sequences.h +0 -0
  96. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress_superblock.h +0 -0
  97. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_fast.h +0 -0
  98. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_ldm.h +0 -0
  99. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_ldm_geartab.h +0 -0
  100. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstdmt_compress.h +0 -0
  101. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/zstd_ddict.c +0 -0
  102. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/zstd_ddict.h +0 -0
  103. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/zdict.h +0 -0
  104. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/zstd_errors.h +0 -0
  105. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/gzcompatibility.h +0 -0
  106. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/gzguts.h +0 -0
  107. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/zstd_zlibwrapper.c +0 -0
  108. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/zstd_zlibwrapper.h +0 -0
@@ -33,9 +33,7 @@ local gzFile gz_open _Z_OF((const void *, int, const char *));
33
33
 
34
34
  The gz_strwinerror function does not change the current setting of
35
35
  GetLastError. */
36
- char ZLIB_INTERNAL *gz_strwinerror (error)
37
- DWORD error;
38
- {
36
+ char ZLIB_INTERNAL *gz_strwinerror(DWORD error) {
39
37
  static char buf[1024];
40
38
 
41
39
  wchar_t *msgbuf;
@@ -75,9 +73,7 @@ char ZLIB_INTERNAL *gz_strwinerror (error)
75
73
  #endif /* UNDER_CE */
76
74
 
77
75
  /* Reset gzip file state */
78
- local void gz_reset(state)
79
- gz_statep state;
80
- {
76
+ local void gz_reset(gz_statep state) {
81
77
  state.state->x.have = 0; /* no output data available */
82
78
  if (state.state->mode == GZ_READ) { /* for reading ... */
83
79
  state.state->eof = 0; /* not at end of file */
@@ -91,11 +87,7 @@ local void gz_reset(state)
91
87
  }
92
88
 
93
89
  /* Open a gzip file either by name or file descriptor. */
94
- local gzFile gz_open(path, fd, mode)
95
- const void *path;
96
- int fd;
97
- const char *mode;
98
- {
90
+ local gzFile gz_open(const void *path, int fd, const char *mode) {
99
91
  gz_statep state;
100
92
  z_size_t len;
101
93
  int oflag;
@@ -270,26 +262,17 @@ local gzFile gz_open(path, fd, mode)
270
262
  }
271
263
 
272
264
  /* -- see zlib.h -- */
273
- gzFile ZEXPORT gzopen(path, mode)
274
- const char *path;
275
- const char *mode;
276
- {
265
+ gzFile ZEXPORT gzopen(const char *path, const char *mode) {
277
266
  return gz_open(path, -1, mode);
278
267
  }
279
268
 
280
269
  /* -- see zlib.h -- */
281
- gzFile ZEXPORT gzopen64(path, mode)
282
- const char *path;
283
- const char *mode;
284
- {
270
+ gzFile ZEXPORT gzopen64(const char *path, const char *mode) {
285
271
  return gz_open(path, -1, mode);
286
272
  }
287
273
 
288
274
  /* -- see zlib.h -- */
289
- gzFile ZEXPORT gzdopen(fd, mode)
290
- int fd;
291
- const char *mode;
292
- {
275
+ gzFile ZEXPORT gzdopen(int fd, const char *mode) {
293
276
  char *path; /* identifier for error messages */
294
277
  gzFile gz;
295
278
 
@@ -307,19 +290,13 @@ gzFile ZEXPORT gzdopen(fd, mode)
307
290
 
308
291
  /* -- see zlib.h -- */
309
292
  #ifdef WIDECHAR
310
- gzFile ZEXPORT gzopen_w(path, mode)
311
- const wchar_t *path;
312
- const char *mode;
313
- {
293
+ gzFile ZEXPORT gzopen_w(const wchar_t *path, const char *mode) {
314
294
  return gz_open(path, -2, mode);
315
295
  }
316
296
  #endif
317
297
 
318
298
  /* -- see zlib.h -- */
319
- int ZEXPORT gzbuffer(file, size)
320
- gzFile file;
321
- unsigned size;
322
- {
299
+ int ZEXPORT gzbuffer(gzFile file, unsigned size) {
323
300
  gz_statep state;
324
301
 
325
302
  /* get internal structure and check integrity */
@@ -343,9 +320,7 @@ int ZEXPORT gzbuffer(file, size)
343
320
  }
344
321
 
345
322
  /* -- see zlib.h -- */
346
- int ZEXPORT gzrewind(file)
347
- gzFile file;
348
- {
323
+ int ZEXPORT gzrewind(gzFile file) {
349
324
  gz_statep state;
350
325
 
351
326
  /* get internal structure */
@@ -366,11 +341,7 @@ int ZEXPORT gzrewind(file)
366
341
  }
367
342
 
368
343
  /* -- see zlib.h -- */
369
- z_off64_t ZEXPORT gzseek64(file, offset, whence)
370
- gzFile file;
371
- z_off64_t offset;
372
- int whence;
373
- {
344
+ z_off64_t ZEXPORT gzseek64(gzFile file, z_off64_t offset, int whence) {
374
345
  unsigned n;
375
346
  z_off64_t ret;
376
347
  gz_statep state;
@@ -443,11 +414,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
443
414
  }
444
415
 
445
416
  /* -- see zlib.h -- */
446
- z_off_t ZEXPORT gzseek(file, offset, whence)
447
- gzFile file;
448
- z_off_t offset;
449
- int whence;
450
- {
417
+ z_off_t ZEXPORT gzseek(gzFile file, z_off_t offset, int whence) {
451
418
  z_off64_t ret;
452
419
 
453
420
  ret = gzseek64(file, (z_off64_t)offset, whence);
@@ -455,9 +422,7 @@ z_off_t ZEXPORT gzseek(file, offset, whence)
455
422
  }
456
423
 
457
424
  /* -- see zlib.h -- */
458
- z_off64_t ZEXPORT gztell64(file)
459
- gzFile file;
460
- {
425
+ z_off64_t ZEXPORT gztell64(gzFile file) {
461
426
  gz_statep state;
462
427
 
463
428
  /* get internal structure and check integrity */
@@ -472,9 +437,7 @@ z_off64_t ZEXPORT gztell64(file)
472
437
  }
473
438
 
474
439
  /* -- see zlib.h -- */
475
- z_off_t ZEXPORT gztell(file)
476
- gzFile file;
477
- {
440
+ z_off_t ZEXPORT gztell(gzFile file) {
478
441
  z_off64_t ret;
479
442
 
480
443
  ret = gztell64(file);
@@ -482,9 +445,7 @@ z_off_t ZEXPORT gztell(file)
482
445
  }
483
446
 
484
447
  /* -- see zlib.h -- */
485
- z_off64_t ZEXPORT gzoffset64(file)
486
- gzFile file;
487
- {
448
+ z_off64_t ZEXPORT gzoffset64(gzFile file) {
488
449
  z_off64_t offset;
489
450
  gz_statep state;
490
451
 
@@ -505,9 +466,7 @@ z_off64_t ZEXPORT gzoffset64(file)
505
466
  }
506
467
 
507
468
  /* -- see zlib.h -- */
508
- z_off_t ZEXPORT gzoffset(file)
509
- gzFile file;
510
- {
469
+ z_off_t ZEXPORT gzoffset(gzFile file) {
511
470
  z_off64_t ret;
512
471
 
513
472
  ret = gzoffset64(file);
@@ -515,9 +474,7 @@ z_off_t ZEXPORT gzoffset(file)
515
474
  }
516
475
 
517
476
  /* -- see zlib.h -- */
518
- int ZEXPORT gzeof(file)
519
- gzFile file;
520
- {
477
+ int ZEXPORT gzeof(gzFile file) {
521
478
  gz_statep state;
522
479
 
523
480
  /* get internal structure and check integrity */
@@ -532,10 +489,7 @@ int ZEXPORT gzeof(file)
532
489
  }
533
490
 
534
491
  /* -- see zlib.h -- */
535
- const char * ZEXPORT gzerror(file, errnum)
536
- gzFile file;
537
- int *errnum;
538
- {
492
+ const char * ZEXPORT gzerror(gzFile file, int *errnum) {
539
493
  gz_statep state;
540
494
 
541
495
  /* get internal structure and check integrity */
@@ -553,9 +507,7 @@ const char * ZEXPORT gzerror(file, errnum)
553
507
  }
554
508
 
555
509
  /* -- see zlib.h -- */
556
- void ZEXPORT gzclearerr(file)
557
- gzFile file;
558
- {
510
+ void ZEXPORT gzclearerr(gzFile file) {
559
511
  gz_statep state;
560
512
 
561
513
  /* get internal structure and check integrity */
@@ -579,11 +531,7 @@ void ZEXPORT gzclearerr(file)
579
531
  memory). Simply save the error message as a static string. If there is an
580
532
  allocation failure constructing the error message, then convert the error to
581
533
  out of memory. */
582
- void ZLIB_INTERNAL gz_error(state, err, msg)
583
- gz_statep state;
584
- int err;
585
- const char *msg;
586
- {
534
+ void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg) {
587
535
  /* free previously allocated message and clear */
588
536
  if (state.state->msg != NULL) {
589
537
  if (state.state->err != Z_MEM_ERROR)
@@ -625,8 +573,7 @@ void ZLIB_INTERNAL gz_error(state, err, msg)
625
573
  available) -- we need to do this to cover cases where 2's complement not
626
574
  used, since C standard permits 1's complement and sign-bit representations,
627
575
  otherwise we could just use ((unsigned)-1) >> 1 */
628
- unsigned ZLIB_INTERNAL gz_intmax()
629
- {
576
+ unsigned ZLIB_INTERNAL gz_intmax() {
630
577
  unsigned p, q;
631
578
 
632
579
  p = 1;
@@ -29,12 +29,8 @@ local z_size_t gz_read _Z_OF((gz_statep, voidp, z_size_t));
29
29
  state.state->fd, and update state.state->eof, state.state->err, and state.state->msg as appropriate.
30
30
  This function needs to loop on read(), since read() is not guaranteed to
31
31
  read the number of bytes requested, depending on the type of descriptor. */
32
- local int gz_load(state, buf, len, have)
33
- gz_statep state;
34
- unsigned char *buf;
35
- unsigned len;
36
- unsigned *have;
37
- {
32
+ local int gz_load(gz_statep state, unsigned char *buf, unsigned len,
33
+ unsigned *have) {
38
34
  ssize_t ret;
39
35
  unsigned get, max = ((unsigned)-1 >> 2) + 1;
40
36
 
@@ -64,8 +60,7 @@ local int gz_load(state, buf, len, have)
64
60
  If strm->avail_in != 0, then the current data is moved to the beginning of
65
61
  the input buffer, and then the remainder of the buffer is loaded with the
66
62
  available data from the input file. */
67
- local int gz_avail(state)
68
- gz_statep state;
63
+ local int gz_avail(gz_statep state)
69
64
  {
70
65
  unsigned got;
71
66
  z_streamp strm = &(state.state->strm);
@@ -99,9 +94,7 @@ local int gz_avail(state)
99
94
  case, all further file reads will be directly to either the output buffer or
100
95
  a user buffer. If decompressing, the inflate state will be initialized.
101
96
  gz_look() will return 0 on success or -1 on failure. */
102
- local int gz_look(state)
103
- gz_statep state;
104
- {
97
+ local int gz_look(gz_statep state) {
105
98
  z_streamp strm = &(state.state->strm);
106
99
 
107
100
  /* allocate read buffers and inflate memory */
@@ -184,9 +177,7 @@ local int gz_look(state)
184
177
  data. If the gzip stream completes, state.state->how is reset to LOOK to look for
185
178
  the next gzip stream or raw data, once state.state->x.have is depleted. Returns 0
186
179
  on success, -1 on failure. */
187
- local int gz_decomp(state)
188
- gz_statep state;
189
- {
180
+ local int gz_decomp(gz_statep state) {
190
181
  int ret = Z_OK;
191
182
  unsigned had;
192
183
  z_streamp strm = &(state.state->strm);
@@ -238,9 +229,7 @@ local int gz_decomp(state)
238
229
  looked for to determine whether to copy or decompress. Returns -1 on error,
239
230
  otherwise 0. gz_fetch() will leave state.state->how as COPY or GZIP unless the
240
231
  end of the input file has been reached and all data has been processed. */
241
- local int gz_fetch(state)
242
- gz_statep state;
243
- {
232
+ local int gz_fetch(gz_statep state) {
244
233
  z_streamp strm = &(state.state->strm);
245
234
 
246
235
  do {
@@ -268,10 +257,7 @@ local int gz_fetch(state)
268
257
  }
269
258
 
270
259
  /* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */
271
- local int gz_skip(state, len)
272
- gz_statep state;
273
- z_off64_t len;
274
- {
260
+ local int gz_skip(gz_statep state, z_off64_t len) {
275
261
  unsigned n;
276
262
 
277
263
  /* skip over len bytes or reach end-of-file, whichever comes first */
@@ -303,11 +289,7 @@ local int gz_skip(state, len)
303
289
  input. Return the number of bytes read. If zero is returned, either the
304
290
  end of file was reached, or there was an error. state.state->err must be
305
291
  consulted in that case to determine which. */
306
- local z_size_t gz_read(state, buf, len)
307
- gz_statep state;
308
- voidp buf;
309
- z_size_t len;
310
- {
292
+ local z_size_t gz_read(gz_statep state, voidp buf, z_size_t len) {
311
293
  z_size_t got;
312
294
  unsigned n;
313
295
 
@@ -384,11 +366,7 @@ local z_size_t gz_read(state, buf, len)
384
366
  }
385
367
 
386
368
  /* -- see zlib.h -- */
387
- int ZEXPORT gzread(file, buf, len)
388
- gzFile file;
389
- voidp buf;
390
- unsigned len;
391
- {
369
+ int ZEXPORT gzread(gzFile file, voidp buf, unsigned len) {
392
370
  gz_statep state;
393
371
 
394
372
  /* get internal structure */
@@ -420,12 +398,8 @@ int ZEXPORT gzread(file, buf, len)
420
398
  }
421
399
 
422
400
  /* -- see zlib.h -- */
423
- z_size_t ZEXPORT gzfread(buf, size, nitems, file)
424
- voidp buf;
425
- z_size_t size;
426
- z_size_t nitems;
427
- gzFile file;
428
- {
401
+ z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems,
402
+ gzFile file) {
429
403
  z_size_t len;
430
404
  gz_statep state;
431
405
 
@@ -468,9 +442,7 @@ ZEXTERN int ZEXPORT gzgetc _Z_OF((gzFile file));
468
442
  ZEXTERN int ZEXPORT gzgetc_ _Z_OF((gzFile file));
469
443
  #endif
470
444
 
471
- int ZEXPORT gzgetc(file)
472
- gzFile file;
473
- {
445
+ int ZEXPORT gzgetc(gzFile file) {
474
446
  int ret;
475
447
  unsigned char buf[1];
476
448
  gz_statep state;
@@ -497,17 +469,12 @@ int ZEXPORT gzgetc(file)
497
469
  return ret < 1 ? -1 : buf[0];
498
470
  }
499
471
 
500
- int ZEXPORT gzgetc_(file)
501
- gzFile file;
502
- {
472
+ int ZEXPORT gzgetc_(gzFile file) {
503
473
  return gzgetc(file);
504
474
  }
505
475
 
506
476
  /* -- see zlib.h -- */
507
- int ZEXPORT gzungetc(c, file)
508
- int c;
509
- gzFile file;
510
- {
477
+ int ZEXPORT gzungetc(int c, gzFile file) {
511
478
  gz_statep state;
512
479
 
513
480
  /* get internal structure */
@@ -564,11 +531,7 @@ int ZEXPORT gzungetc(c, file)
564
531
  }
565
532
 
566
533
  /* -- see zlib.h -- */
567
- char * ZEXPORT gzgets(file, buf, len)
568
- gzFile file;
569
- char *buf;
570
- int len;
571
- {
534
+ char * ZEXPORT gzgets(gzFile file, char *buf, int len) {
572
535
  unsigned left, n;
573
536
  char *str;
574
537
  unsigned char *eol;
@@ -628,9 +591,7 @@ char * ZEXPORT gzgets(file, buf, len)
628
591
  }
629
592
 
630
593
  /* -- see zlib.h -- */
631
- int ZEXPORT gzdirect(file)
632
- gzFile file;
633
- {
594
+ int ZEXPORT gzdirect(gzFile file) {
634
595
  gz_statep state;
635
596
 
636
597
  /* get internal structure */
@@ -648,9 +609,7 @@ int ZEXPORT gzdirect(file)
648
609
  }
649
610
 
650
611
  /* -- see zlib.h -- */
651
- int ZEXPORT gzclose_r(file)
652
- gzFile file;
653
- {
612
+ int ZEXPORT gzclose_r(gzFile file) {
654
613
  int ret, err;
655
614
  gz_statep state;
656
615
 
@@ -19,9 +19,7 @@ local z_size_t gz_write _Z_OF((gz_statep, voidpc, z_size_t));
19
19
  /* Initialize state for writing a gzip file. Mark initialization by setting
20
20
  state.state->size to non-zero. Return -1 on a memory allocation failure, or 0 on
21
21
  success. */
22
- local int gz_init(state)
23
- gz_statep state;
24
- {
22
+ local int gz_init(gz_statep state) {
25
23
  int ret;
26
24
  z_streamp strm = &(state.state->strm);
27
25
 
@@ -75,10 +73,7 @@ local int gz_init(state)
75
73
  deflate() flush value. If flush is Z_FINISH, then the deflate() state is
76
74
  reset to start a new gzip stream. If gz->direct is true, then simply write
77
75
  to the output file without compressing, and ignore flush. */
78
- local int gz_comp(state, flush)
79
- gz_statep state;
80
- int flush;
81
- {
76
+ local int gz_comp(gz_statep state, int flush) {
82
77
  int ret, writ;
83
78
  unsigned have, put, max = ((unsigned)-1 >> 2) + 1;
84
79
  z_streamp strm = &(state.state->strm);
@@ -147,10 +142,7 @@ local int gz_comp(state, flush)
147
142
 
148
143
  /* Compress len zeros to output. Return -1 on a write error or memory
149
144
  allocation failure by gz_comp(), or 0 on success. */
150
- local int gz_zero(state, len)
151
- gz_statep state;
152
- z_off64_t len;
153
- {
145
+ local int gz_zero(gz_statep state, z_off64_t len) {
154
146
  int first;
155
147
  unsigned n;
156
148
  z_streamp strm = &(state.state->strm);
@@ -180,11 +172,7 @@ local int gz_zero(state, len)
180
172
 
181
173
  /* Write len bytes from buf to file. Return the number of bytes written. If
182
174
  the returned value is less than len, then there was an error. */
183
- local z_size_t gz_write(state, buf, len)
184
- gz_statep state;
185
- voidpc buf;
186
- z_size_t len;
187
- {
175
+ local z_size_t gz_write(gz_statep state, voidpc buf, z_size_t len) {
188
176
  z_size_t put = len;
189
177
 
190
178
  /* if len is zero, avoid unnecessary operations */
@@ -248,11 +236,7 @@ local z_size_t gz_write(state, buf, len)
248
236
  }
249
237
 
250
238
  /* -- see zlib.h -- */
251
- int ZEXPORT gzwrite(file, buf, len)
252
- gzFile file;
253
- voidpc buf;
254
- unsigned len;
255
- {
239
+ int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len) {
256
240
  gz_statep state;
257
241
 
258
242
  /* get internal structure */
@@ -276,12 +260,8 @@ int ZEXPORT gzwrite(file, buf, len)
276
260
  }
277
261
 
278
262
  /* -- see zlib.h -- */
279
- z_size_t ZEXPORT gzfwrite(buf, size, nitems, file)
280
- voidpc buf;
281
- z_size_t size;
282
- z_size_t nitems;
283
- gzFile file;
284
- {
263
+ z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size, z_size_t nitems,
264
+ gzFile file) {
285
265
  z_size_t len;
286
266
  gz_statep state;
287
267
 
@@ -307,10 +287,7 @@ z_size_t ZEXPORT gzfwrite(buf, size, nitems, file)
307
287
  }
308
288
 
309
289
  /* -- see zlib.h -- */
310
- int ZEXPORT gzputc(file, c)
311
- gzFile file;
312
- int c;
313
- {
290
+ int ZEXPORT gzputc(gzFile file, int c) {
314
291
  unsigned have;
315
292
  unsigned char buf[1];
316
293
  gz_statep state;
@@ -355,10 +332,7 @@ int ZEXPORT gzputc(file, c)
355
332
  }
356
333
 
357
334
  /* -- see zlib.h -- */
358
- int ZEXPORT gzputs(file, str)
359
- gzFile file;
360
- const char *str;
361
- {
335
+ int ZEXPORT gzputs(gzFile file, const char *str) {
362
336
  int ret;
363
337
  z_size_t len;
364
338
  gz_statep state;
@@ -382,8 +356,7 @@ int ZEXPORT gzputs(file, str)
382
356
  #include <stdarg.h>
383
357
 
384
358
  /* -- see zlib.h -- */
385
- int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va)
386
- {
359
+ int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) {
387
360
  int len;
388
361
  unsigned left;
389
362
  char *next;
@@ -454,8 +427,7 @@ int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va)
454
427
  return len;
455
428
  }
456
429
 
457
- int ZEXPORTVA gzprintf(gzFile file, const char *format, ...)
458
- {
430
+ int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) {
459
431
  va_list va;
460
432
  int ret;
461
433
 
@@ -468,13 +440,10 @@ int ZEXPORTVA gzprintf(gzFile file, const char *format, ...)
468
440
  #else /* !STDC && !Z_HAVE_STDARG_H */
469
441
 
470
442
  /* -- see zlib.h -- */
471
- int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
472
- a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
473
- gzFile file;
474
- const char *format;
475
- int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
476
- a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;
477
- {
443
+ int ZEXPORTVA gzprintf(gzFile file, const char *format, int a1, int a2, int a3,
444
+ int a4, int a5, int a6, int a7, int a8, int a9, int a10,
445
+ int a11, int a12, int a13, int a14, int a15, int a16,
446
+ int a17, int a18, int a19, int a20) {
478
447
  unsigned len, left;
479
448
  char *next;
480
449
  gz_statep state;
@@ -556,10 +525,7 @@ int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
556
525
  #endif
557
526
 
558
527
  /* -- see zlib.h -- */
559
- int ZEXPORT gzflush(file, flush)
560
- gzFile file;
561
- int flush;
562
- {
528
+ int ZEXPORT gzflush(gzFile file, int flush) {
563
529
  gz_statep state;
564
530
 
565
531
  /* get internal structure */
@@ -588,11 +554,7 @@ int ZEXPORT gzflush(file, flush)
588
554
  }
589
555
 
590
556
  /* -- see zlib.h -- */
591
- int ZEXPORT gzsetparams(file, level, strategy)
592
- gzFile file;
593
- int level;
594
- int strategy;
595
- {
557
+ int ZEXPORT gzsetparams(gzFile file, int level, int strategy) {
596
558
  gz_statep state;
597
559
  z_streamp strm;
598
560
 
@@ -630,9 +592,7 @@ int ZEXPORT gzsetparams(file, level, strategy)
630
592
  }
631
593
 
632
594
  /* -- see zlib.h -- */
633
- int ZEXPORT gzclose_w(file)
634
- gzFile file;
635
- {
595
+ int ZEXPORT gzclose_w(gzFile file) {
636
596
  int ret = Z_OK;
637
597
  gz_statep state;
638
598
 
data/lib/2.4/zstdlib_c.so CHANGED
Binary file
data/lib/2.5/zstdlib_c.so CHANGED
Binary file
data/lib/2.6/zstdlib_c.so CHANGED
Binary file
data/lib/2.7/zstdlib_c.so CHANGED
Binary file
data/lib/3.0/zstdlib_c.so CHANGED
Binary file