zlib-streams 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/Makefile +10 -10
  2. package/build/debug/src/inffast.d +8 -0
  3. package/build/debug/src/inffast.o +0 -0
  4. package/build/debug/src/inflate.d +8 -0
  5. package/build/debug/src/inflate.o +0 -0
  6. package/build/debug/src/inftrees.d +6 -0
  7. package/build/debug/src/inftrees.o +0 -0
  8. package/build/debug/src/zlib/adler32.d +5 -0
  9. package/build/debug/src/zlib/adler32.o +0 -0
  10. package/build/debug/src/zlib/contrib/infback9/infback9.d +13 -0
  11. package/build/debug/src/zlib/contrib/infback9/infback9.o +0 -0
  12. package/build/debug/src/zlib/contrib/infback9/inftree9.d +7 -0
  13. package/build/debug/src/zlib/contrib/infback9/inftree9.o +0 -0
  14. package/build/debug/src/zlib/crc32.d +6 -0
  15. package/build/debug/src/zlib/crc32.o +0 -0
  16. package/build/debug/src/zlib/trees.d +7 -0
  17. package/build/debug/src/zlib/trees.o +0 -0
  18. package/build/debug/src/zlib/zutil.d +6 -0
  19. package/build/debug/src/zlib/zutil.o +0 -0
  20. package/dist/zlib-streams-dev.wasm +0 -0
  21. package/dist/zlib-streams.wasm +0 -0
  22. package/package.json +1 -1
  23. package/src/inffast.c +320 -0
  24. package/src/inflate.c +1537 -0
  25. package/src/inflate.h +128 -0
  26. package/src/inftrees.c +321 -0
  27. package/src/inftrees.h +67 -0
  28. package/src/trees.c +1053 -0
  29. package/src/wasm/inflate9_stream_wasm.c +6 -18
  30. package/tmp/all_runs/payload_decompress_nowindow_debug__100k_lines.deflate64.log +34 -0
  31. package/tmp/all_runs/payload_decompress_nowindow_debug__100k_lines.deflate64.out +100000 -0
  32. package/tmp/all_runs/payload_decompress_nowindow_debug__10k_lines.deflate64.log +2 -0
  33. package/tmp/all_runs/payload_decompress_nowindow_debug__10k_lines.deflate64.out +10000 -0
  34. package/tmp/all_runs/payload_decompress_nowindow_debug__payload_63k.deflate64.log +1 -0
  35. package/tmp/all_runs/payload_decompress_nowindow_debug__payload_63k.deflate64.out +0 -0
  36. package/tmp/all_runs/payload_decompress_nowindow_debug__payload_64k.deflate64.log +1 -0
  37. package/tmp/all_runs/payload_decompress_nowindow_debug__payload_64k.deflate64.out +0 -0
  38. package/tmp/all_runs/payload_decompress_nowindow_debug__payload_65k.deflate64.log +2 -0
  39. package/tmp/all_runs/payload_decompress_nowindow_debug__payload_65k.deflate64.out +0 -0
  40. package/tmp/all_runs/payload_decompress_nowindow_debug__rand_block_gap.deflate64.log +1 -0
  41. package/tmp/all_runs/payload_decompress_nowindow_debug__rand_block_gap.deflate64.out +0 -0
  42. package/tmp/all_runs/payload_decompress_nowindow_debug__repeat_63k.deflate64.log +1 -0
  43. package/tmp/all_runs/payload_decompress_nowindow_debug__repeat_63k.deflate64.out +0 -0
  44. package/tmp/all_runs/payload_decompress_nowindow_debug__repeat_64k.deflate64.log +1 -0
  45. package/tmp/all_runs/payload_decompress_nowindow_debug__repeat_64k.deflate64.out +0 -0
  46. package/tmp/all_runs/payload_decompress_nowindow_debug__repeat_65k.deflate64.log +2 -0
  47. package/tmp/all_runs/payload_decompress_nowindow_debug__repeat_65k.deflate64.out +0 -0
  48. package/tmp/all_runs/payload_decompress_nowindow_debug__zeros_100k.deflate64.log +2 -0
  49. package/tmp/all_runs/payload_decompress_nowindow_debug__zeros_100k.deflate64.out +0 -0
  50. package/tmp/all_runs/payload_decompress_ref_debug__100k_lines.deflate64.log +1 -0
  51. package/tmp/all_runs/payload_decompress_ref_debug__100k_lines.deflate64.out +100000 -0
  52. package/tmp/all_runs/payload_decompress_ref_debug__10k_lines.deflate64.log +1 -0
  53. package/tmp/all_runs/payload_decompress_ref_debug__10k_lines.deflate64.out +10000 -0
  54. package/tmp/all_runs/payload_decompress_ref_debug__payload_63k.deflate64.log +1 -0
  55. package/tmp/all_runs/payload_decompress_ref_debug__payload_63k.deflate64.out +0 -0
  56. package/tmp/all_runs/payload_decompress_ref_debug__payload_64k.deflate64.log +1 -0
  57. package/tmp/all_runs/payload_decompress_ref_debug__payload_64k.deflate64.out +0 -0
  58. package/tmp/all_runs/payload_decompress_ref_debug__payload_65k.deflate64.log +1 -0
  59. package/tmp/all_runs/payload_decompress_ref_debug__payload_65k.deflate64.out +0 -0
  60. package/tmp/all_runs/payload_decompress_ref_debug__rand_block_gap.deflate64.log +1 -0
  61. package/tmp/all_runs/payload_decompress_ref_debug__rand_block_gap.deflate64.out +0 -0
  62. package/tmp/all_runs/payload_decompress_ref_debug__repeat_63k.deflate64.log +1 -0
  63. package/tmp/all_runs/payload_decompress_ref_debug__repeat_63k.deflate64.out +0 -0
  64. package/tmp/all_runs/payload_decompress_ref_debug__repeat_64k.deflate64.log +1 -0
  65. package/tmp/all_runs/payload_decompress_ref_debug__repeat_64k.deflate64.out +0 -0
  66. package/tmp/all_runs/payload_decompress_ref_debug__repeat_65k.deflate64.log +1 -0
  67. package/tmp/all_runs/payload_decompress_ref_debug__repeat_65k.deflate64.out +0 -0
  68. package/tmp/all_runs/payload_decompress_ref_debug__zeros_100k.deflate64.log +1 -0
  69. package/tmp/all_runs/payload_decompress_ref_debug__zeros_100k.deflate64.out +0 -0
  70. package/tmp/all_runs/payload_decompress_test_debug__100k_lines.deflate64.log +34 -0
  71. package/tmp/all_runs/payload_decompress_test_debug__100k_lines.deflate64.out +100000 -0
  72. package/tmp/all_runs/payload_decompress_test_debug__10k_lines.deflate64.log +2 -0
  73. package/tmp/all_runs/payload_decompress_test_debug__10k_lines.deflate64.out +10000 -0
  74. package/tmp/all_runs/payload_decompress_test_debug__payload_63k.deflate64.log +1 -0
  75. package/tmp/all_runs/payload_decompress_test_debug__payload_63k.deflate64.out +0 -0
  76. package/tmp/all_runs/payload_decompress_test_debug__payload_64k.deflate64.log +1 -0
  77. package/tmp/all_runs/payload_decompress_test_debug__payload_64k.deflate64.out +0 -0
  78. package/tmp/all_runs/payload_decompress_test_debug__payload_65k.deflate64.log +2 -0
  79. package/tmp/all_runs/payload_decompress_test_debug__payload_65k.deflate64.out +0 -0
  80. package/tmp/all_runs/payload_decompress_test_debug__rand_block_gap.deflate64.log +1 -0
  81. package/tmp/all_runs/payload_decompress_test_debug__rand_block_gap.deflate64.out +0 -0
  82. package/tmp/all_runs/payload_decompress_test_debug__repeat_63k.deflate64.log +1 -0
  83. package/tmp/all_runs/payload_decompress_test_debug__repeat_63k.deflate64.out +0 -0
  84. package/tmp/all_runs/payload_decompress_test_debug__repeat_64k.deflate64.log +1 -0
  85. package/tmp/all_runs/payload_decompress_test_debug__repeat_64k.deflate64.out +0 -0
  86. package/tmp/all_runs/payload_decompress_test_debug__repeat_65k.deflate64.log +2 -0
  87. package/tmp/all_runs/payload_decompress_test_debug__repeat_65k.deflate64.out +0 -0
  88. package/tmp/all_runs/payload_decompress_test_debug__zeros_100k.deflate64.log +2 -0
  89. package/tmp/all_runs/payload_decompress_test_debug__zeros_100k.deflate64.out +0 -0
  90. package/tmp/all_runs/wasm__100k_lines.deflate64.out +100000 -0
  91. package/tmp/all_runs/wasm__10k_lines.deflate64.out +10000 -0
  92. package/tmp/all_runs/wasm__payload_63k.deflate64.out +0 -0
  93. package/tmp/all_runs/wasm__payload_64k.deflate64.out +0 -0
  94. package/tmp/all_runs/wasm__payload_65k.deflate64.out +0 -0
  95. package/tmp/all_runs/wasm__rand_block_gap.deflate64.out +0 -0
  96. package/tmp/all_runs/wasm__repeat_63k.deflate64.out +0 -0
  97. package/tmp/all_runs/wasm__repeat_64k.deflate64.out +0 -0
  98. package/tmp/all_runs/wasm__repeat_65k.deflate64.out +0 -0
  99. package/tmp/all_runs/wasm__zeros_100k.deflate64.out +0 -0
  100. package/tmp/diagnose/diagnose_stream_mem.json +4202 -0
  101. package/src/inflate9.c +0 -859
  102. package/src/inflate9.h +0 -9
@@ -2,15 +2,9 @@
2
2
  #include <string.h>
3
3
  #include <stdint.h>
4
4
  #include "zlib.h"
5
- #include "inflate9.h"
6
5
  #include "wasm_stream_common.h"
7
- #ifndef DEFLATE64_WBITS
8
- #if defined(MAX_WBITS) && (MAX_WBITS >= 16)
9
- #define DEFLATE64_WBITS MAX_WBITS
10
- #else
6
+
11
7
  #define DEFLATE64_WBITS 16
12
- #endif
13
- #endif
14
8
 
15
9
  struct wasm_inflate9_ctx {
16
10
  WASM_STREAM_COMMON_FIELDS;
@@ -18,28 +12,22 @@ struct wasm_inflate9_ctx {
18
12
 
19
13
  unsigned inflate9_new(void) { return wasm_stream_new(); }
20
14
 
21
- int inflate9_init(unsigned zptr) {
22
- struct wasm_inflate9_ctx *c = (struct wasm_inflate9_ctx *)(uintptr_t)zptr;
23
- if (!c)
24
- return Z_STREAM_ERROR;
25
- return inflate9Init(&c->strm);
26
- }
27
-
28
15
  int inflate9_init_raw(unsigned zptr) {
29
16
  struct wasm_inflate9_ctx *c = (struct wasm_inflate9_ctx *)(uintptr_t)zptr;
30
17
  if (!c)
31
18
  return Z_STREAM_ERROR;
32
- return inflate9Init2_(&c->strm, -DEFLATE64_WBITS, ZLIB_VERSION,
33
- (int)sizeof(z_stream));
19
+ return inflateInit2(&c->strm, -DEFLATE64_WBITS);
34
20
  }
35
21
 
22
+ int inflate9_init(unsigned zptr) { return inflate9_init_raw(zptr); }
23
+
36
24
  int inflate9_process(unsigned zptr, unsigned in_ptr, unsigned in_len,
37
25
  unsigned out_ptr, unsigned out_len, int flush) {
38
26
  return wasm_stream_process_common(zptr, in_ptr, in_len, out_ptr, out_len,
39
- flush, inflate9);
27
+ flush, inflate);
40
28
  }
41
29
 
42
- int inflate9_end(unsigned zptr) { return wasm_stream_end(zptr, inflate9End); }
30
+ int inflate9_end(unsigned zptr) { return wasm_stream_end(zptr, inflateEnd); }
43
31
 
44
32
  unsigned inflate9_last_consumed(unsigned zptr) {
45
33
  return wasm_stream_last_consumed(zptr);
@@ -0,0 +1,34 @@
1
+ inflate nowindow loop ret=0 produced=65536
2
+ inflate nowindow loop ret=0 produced=65536
3
+ inflate nowindow loop ret=0 produced=65536
4
+ inflate nowindow loop ret=0 produced=65536
5
+ inflate nowindow loop ret=0 produced=65536
6
+ inflate nowindow loop ret=0 produced=65536
7
+ inflate nowindow loop ret=0 produced=65536
8
+ inflate nowindow loop ret=0 produced=65536
9
+ inflate nowindow loop ret=0 produced=65536
10
+ inflate nowindow loop ret=0 produced=65536
11
+ inflate nowindow loop ret=0 produced=65536
12
+ inflate nowindow loop ret=0 produced=65536
13
+ inflate nowindow loop ret=0 produced=65536
14
+ inflate nowindow loop ret=0 produced=65536
15
+ inflate nowindow loop ret=0 produced=65536
16
+ inflate nowindow loop ret=0 produced=65536
17
+ inflate nowindow loop ret=0 produced=65536
18
+ inflate nowindow loop ret=0 produced=65536
19
+ inflate nowindow loop ret=0 produced=65536
20
+ inflate nowindow loop ret=0 produced=65536
21
+ inflate nowindow loop ret=0 produced=65536
22
+ inflate nowindow loop ret=0 produced=65536
23
+ inflate nowindow loop ret=0 produced=65536
24
+ inflate nowindow loop ret=0 produced=65536
25
+ inflate nowindow loop ret=0 produced=65536
26
+ inflate nowindow loop ret=0 produced=65536
27
+ inflate nowindow loop ret=0 produced=65536
28
+ inflate nowindow loop ret=0 produced=65536
29
+ inflate nowindow loop ret=0 produced=65536
30
+ inflate nowindow loop ret=0 produced=65536
31
+ inflate nowindow loop ret=0 produced=65536
32
+ inflate nowindow loop ret=0 produced=65536
33
+ inflate nowindow loop ret=0 produced=65536
34
+ inflate nowindow loop ret=1 produced=26202