zlib-streams 1.0.0 → 1.0.2
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 +4 -4
- package/README.md +1 -1
- package/build/debug/src/inffast9.d +9 -0
- package/build/debug/src/inffast9.o +0 -0
- package/build/debug/src/inflate9.d +12 -0
- package/build/debug/src/inflate9.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/infback.d +10 -0
- package/build/debug/src/zlib/infback.o +0 -0
- package/build/debug/src/zlib/inffast.d +9 -0
- package/build/debug/src/zlib/inffast.o +0 -0
- package/build/debug/src/zlib/inflate.d +10 -0
- package/build/debug/src/zlib/inflate.o +0 -0
- package/build/debug/src/zlib/inftrees.d +6 -0
- package/build/debug/src/zlib/inftrees.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/build/src/inffast9.d +9 -0
- package/build/src/inffast9.o +0 -0
- package/build/src/inflate9.d +12 -0
- package/build/src/inflate9.o +0 -0
- package/build/src/zlib/adler32.d +5 -0
- package/build/src/zlib/adler32.o +0 -0
- package/build/src/zlib/contrib/infback9/infback9.d +13 -0
- package/build/src/zlib/contrib/infback9/infback9.o +0 -0
- package/build/src/zlib/contrib/infback9/inftree9.d +7 -0
- package/build/src/zlib/contrib/infback9/inftree9.o +0 -0
- package/build/src/zlib/crc32.d +6 -0
- package/build/src/zlib/crc32.o +0 -0
- package/build/src/zlib/infback.d +10 -0
- package/build/src/zlib/infback.o +0 -0
- package/build/src/zlib/inffast.d +9 -0
- package/build/src/zlib/inffast.o +0 -0
- package/build/src/zlib/inflate.d +10 -0
- package/build/src/zlib/inflate.o +0 -0
- package/build/src/zlib/inftrees.d +6 -0
- package/build/src/zlib/inftrees.o +0 -0
- package/build/src/zlib/trees.d +7 -0
- package/build/src/zlib/trees.o +0 -0
- package/build/src/zlib/zutil.d +6 -0
- package/build/src/zlib/zutil.o +0 -0
- package/dist/zlib-streams.wasm +0 -0
- package/package.json +1 -1
- package/src/inffast9.c +312 -0
- package/src/inffast9.h +11 -0
- package/src/inflate9.c +167 -34
- package/src/wasm/allocator.c +12 -0
- package/src/wasm/allocator.h +4 -0
- package/src/wasm/deflate_stream_wasm.c +3 -2
- package/src/wasm/inflate9_stream_wasm.c +3 -2
- package/src/wasm/inflate_stream_wasm.c +4 -3
- 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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
#include <string.h>
|
|
3
3
|
#include <stdint.h>
|
|
4
4
|
#include "zlib.h"
|
|
5
|
+
#include "allocator.h"
|
|
5
6
|
|
|
6
7
|
#ifndef RAW_WBITS
|
|
7
8
|
#if defined(MAX_WBITS)
|
|
@@ -23,8 +24,8 @@ unsigned deflate_new(void) {
|
|
|
23
24
|
if (!c)
|
|
24
25
|
return 0;
|
|
25
26
|
memset(c, 0, sizeof(*c));
|
|
26
|
-
c->strm.zalloc =
|
|
27
|
-
c->strm.zfree =
|
|
27
|
+
c->strm.zalloc = my_zalloc;
|
|
28
|
+
c->strm.zfree = my_zfree;
|
|
28
29
|
c->strm.opaque = Z_NULL;
|
|
29
30
|
c->inbuf = NULL;
|
|
30
31
|
c->inbuf_sz = 0;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
#include <stdint.h>
|
|
4
4
|
#include "zlib.h"
|
|
5
5
|
#include "inflate9.h"
|
|
6
|
+
#include "allocator.h"
|
|
6
7
|
#ifndef DEFLATE64_WBITS
|
|
7
8
|
#if defined(MAX_WBITS) && (MAX_WBITS >= 16)
|
|
8
9
|
#define DEFLATE64_WBITS MAX_WBITS
|
|
@@ -23,8 +24,8 @@ unsigned inflate9_new(void) {
|
|
|
23
24
|
if (!c)
|
|
24
25
|
return 0;
|
|
25
26
|
memset(c, 0, sizeof(*c));
|
|
26
|
-
c->strm.zalloc =
|
|
27
|
-
c->strm.zfree =
|
|
27
|
+
c->strm.zalloc = my_zalloc;
|
|
28
|
+
c->strm.zfree = my_zfree;
|
|
28
29
|
c->strm.opaque = Z_NULL;
|
|
29
30
|
c->inbuf = NULL;
|
|
30
31
|
c->inbuf_sz = 0;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
#include <string.h>
|
|
3
3
|
#include <stdint.h>
|
|
4
4
|
#include "zlib.h"
|
|
5
|
+
#include "allocator.h"
|
|
5
6
|
|
|
6
7
|
#ifndef RAW_WBITS
|
|
7
8
|
#if defined(MAX_WBITS)
|
|
@@ -23,9 +24,9 @@ unsigned inflate_new(void) {
|
|
|
23
24
|
if (!c)
|
|
24
25
|
return 0;
|
|
25
26
|
memset(c, 0, sizeof(*c));
|
|
26
|
-
c->strm.zalloc =
|
|
27
|
-
c->strm.zfree =
|
|
28
|
-
c->strm.opaque =
|
|
27
|
+
c->strm.zalloc = my_zalloc;
|
|
28
|
+
c->strm.zfree = my_zfree;
|
|
29
|
+
c->strm.opaque = NULL;
|
|
29
30
|
c->inbuf = NULL;
|
|
30
31
|
c->inbuf_sz = 0;
|
|
31
32
|
return (unsigned)(uintptr_t)c;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
2
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
3
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
4
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
5
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
6
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
7
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
8
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
9
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
10
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
11
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
12
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
13
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
14
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
15
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
16
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
17
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
18
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
19
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
20
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
21
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
22
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
23
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
24
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
25
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
26
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
27
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
28
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
29
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
30
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
31
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
32
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
33
|
+
inflate9 nowindow loop ret=0 produced=65536
|
|
34
|
+
inflate9 nowindow loop ret=1 produced=26202
|