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.
- package/Makefile +10 -10
- package/build/debug/src/inffast.d +8 -0
- package/build/debug/src/inffast.o +0 -0
- package/build/debug/src/inflate.d +8 -0
- package/build/debug/src/inflate.o +0 -0
- package/build/debug/src/inftrees.d +6 -0
- package/build/debug/src/inftrees.o +0 -0
- package/build/debug/src/zlib/adler32.d +5 -0
- package/build/debug/src/zlib/adler32.o +0 -0
- package/build/debug/src/zlib/contrib/infback9/infback9.d +13 -0
- package/build/debug/src/zlib/contrib/infback9/infback9.o +0 -0
- package/build/debug/src/zlib/contrib/infback9/inftree9.d +7 -0
- package/build/debug/src/zlib/contrib/infback9/inftree9.o +0 -0
- package/build/debug/src/zlib/crc32.d +6 -0
- package/build/debug/src/zlib/crc32.o +0 -0
- package/build/debug/src/zlib/trees.d +7 -0
- package/build/debug/src/zlib/trees.o +0 -0
- package/build/debug/src/zlib/zutil.d +6 -0
- package/build/debug/src/zlib/zutil.o +0 -0
- package/dist/zlib-streams-dev.wasm +0 -0
- package/dist/zlib-streams.wasm +0 -0
- package/package.json +1 -1
- package/src/inffast.c +320 -0
- package/src/inflate.c +1537 -0
- package/src/inflate.h +128 -0
- package/src/inftrees.c +321 -0
- package/src/inftrees.h +67 -0
- package/src/trees.c +1053 -0
- package/src/wasm/inflate9_stream_wasm.c +6 -18
- package/tmp/all_runs/payload_decompress_nowindow_debug__100k_lines.deflate64.log +34 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__100k_lines.deflate64.out +100000 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__10k_lines.deflate64.log +2 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__10k_lines.deflate64.out +10000 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__payload_63k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__payload_63k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__payload_64k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__payload_64k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__payload_65k.deflate64.log +2 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__payload_65k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__rand_block_gap.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__rand_block_gap.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__repeat_63k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__repeat_63k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__repeat_64k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__repeat_64k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__repeat_65k.deflate64.log +2 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__repeat_65k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__zeros_100k.deflate64.log +2 -0
- package/tmp/all_runs/payload_decompress_nowindow_debug__zeros_100k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_ref_debug__100k_lines.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_ref_debug__100k_lines.deflate64.out +100000 -0
- package/tmp/all_runs/payload_decompress_ref_debug__10k_lines.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_ref_debug__10k_lines.deflate64.out +10000 -0
- package/tmp/all_runs/payload_decompress_ref_debug__payload_63k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_ref_debug__payload_63k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_ref_debug__payload_64k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_ref_debug__payload_64k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_ref_debug__payload_65k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_ref_debug__payload_65k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_ref_debug__rand_block_gap.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_ref_debug__rand_block_gap.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_ref_debug__repeat_63k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_ref_debug__repeat_63k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_ref_debug__repeat_64k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_ref_debug__repeat_64k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_ref_debug__repeat_65k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_ref_debug__repeat_65k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_ref_debug__zeros_100k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_ref_debug__zeros_100k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_test_debug__100k_lines.deflate64.log +34 -0
- package/tmp/all_runs/payload_decompress_test_debug__100k_lines.deflate64.out +100000 -0
- package/tmp/all_runs/payload_decompress_test_debug__10k_lines.deflate64.log +2 -0
- package/tmp/all_runs/payload_decompress_test_debug__10k_lines.deflate64.out +10000 -0
- package/tmp/all_runs/payload_decompress_test_debug__payload_63k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_test_debug__payload_63k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_test_debug__payload_64k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_test_debug__payload_64k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_test_debug__payload_65k.deflate64.log +2 -0
- package/tmp/all_runs/payload_decompress_test_debug__payload_65k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_test_debug__rand_block_gap.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_test_debug__rand_block_gap.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_test_debug__repeat_63k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_test_debug__repeat_63k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_test_debug__repeat_64k.deflate64.log +1 -0
- package/tmp/all_runs/payload_decompress_test_debug__repeat_64k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_test_debug__repeat_65k.deflate64.log +2 -0
- package/tmp/all_runs/payload_decompress_test_debug__repeat_65k.deflate64.out +0 -0
- package/tmp/all_runs/payload_decompress_test_debug__zeros_100k.deflate64.log +2 -0
- package/tmp/all_runs/payload_decompress_test_debug__zeros_100k.deflate64.out +0 -0
- package/tmp/all_runs/wasm__100k_lines.deflate64.out +100000 -0
- package/tmp/all_runs/wasm__10k_lines.deflate64.out +10000 -0
- package/tmp/all_runs/wasm__payload_63k.deflate64.out +0 -0
- package/tmp/all_runs/wasm__payload_64k.deflate64.out +0 -0
- package/tmp/all_runs/wasm__payload_65k.deflate64.out +0 -0
- package/tmp/all_runs/wasm__rand_block_gap.deflate64.out +0 -0
- package/tmp/all_runs/wasm__repeat_63k.deflate64.out +0 -0
- package/tmp/all_runs/wasm__repeat_64k.deflate64.out +0 -0
- package/tmp/all_runs/wasm__repeat_65k.deflate64.out +0 -0
- package/tmp/all_runs/wasm__zeros_100k.deflate64.out +0 -0
- package/tmp/diagnose/diagnose_stream_mem.json +4202 -0
- package/src/inflate9.c +0 -859
- 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
|
-
|
|
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
|
|
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,
|
|
27
|
+
flush, inflate);
|
|
40
28
|
}
|
|
41
29
|
|
|
42
|
-
int inflate9_end(unsigned zptr) { return wasm_stream_end(zptr,
|
|
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
|