wao 0.11.0 → 0.11.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/cjs/aoconnect-base.js +1 -1
- package/cjs/armem-base.js +91 -69
- package/cjs/armem-web.js +1 -2
- package/cjs/armem.js +1 -2
- package/cjs/bao.js +8 -7
- package/cjs/compress.js +0 -1
- package/cjs/wao.js +61 -1
- package/cjs/waosm/waosm.js +19 -48
- package/cjs/waosm-node/waosm_bg.js +19 -48
- package/cjs/weavedrive.js +299 -370
- package/esm/aoconnect-base.js +1 -1
- package/esm/armem-base.js +26 -9
- package/esm/armem-web.js +2 -2
- package/esm/armem.js +2 -2
- package/esm/bao.js +2 -2
- package/esm/compress.js +0 -1
- package/esm/wao.js +19 -1
- package/esm/waosm/README.md +7 -3
- package/esm/waosm/waosm.d.ts +6 -12
- package/esm/waosm/waosm.js +11 -35
- package/esm/waosm/waosm_bg.wasm +0 -0
- package/esm/waosm/waosm_bg.wasm.d.ts +4 -6
- package/esm/waosm-node/README.md +7 -3
- package/esm/waosm-node/waosm.d.ts +2 -6
- package/esm/waosm-node/waosm_bg.js +11 -35
- package/esm/waosm-node/waosm_bg.wasm +0 -0
- package/esm/waosm-node/waosm_bg.wasm.d.ts +4 -6
- package/esm/weavedrive.js +145 -249
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.Waosm = void 0;
|
|
7
7
|
exports.__wbg_buffer_609cc3eee51ed158 = __wbg_buffer_609cc3eee51ed158;
|
|
8
8
|
exports.__wbg_length_a446193dc22c12f8 = __wbg_length_a446193dc22c12f8;
|
|
9
9
|
exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a;
|
|
@@ -70,86 +70,57 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
70
70
|
WASM_VECTOR_LEN = arg.length;
|
|
71
71
|
return ptr;
|
|
72
72
|
}
|
|
73
|
-
var
|
|
73
|
+
var WaosmFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
74
74
|
register: function register() {},
|
|
75
75
|
unregister: function unregister() {}
|
|
76
76
|
} : new FinalizationRegistry(function (ptr) {
|
|
77
|
-
return wasm.
|
|
77
|
+
return wasm.__wbg_waosm_free(ptr >>> 0, 1);
|
|
78
78
|
});
|
|
79
|
-
var
|
|
80
|
-
function
|
|
81
|
-
_classCallCheck(this,
|
|
82
|
-
var ret = wasm.
|
|
79
|
+
var Waosm = exports.Waosm = /*#__PURE__*/function () {
|
|
80
|
+
function Waosm() {
|
|
81
|
+
_classCallCheck(this, Waosm);
|
|
82
|
+
var ret = wasm.waosm_new();
|
|
83
83
|
this.__wbg_ptr = ret >>> 0;
|
|
84
|
-
|
|
84
|
+
WaosmFinalization.register(this, this.__wbg_ptr, this);
|
|
85
85
|
return this;
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
88
|
* @param {Uint8Array} data
|
|
89
89
|
* @returns {Uint8Array}
|
|
90
90
|
*/
|
|
91
|
-
return _createClass(
|
|
91
|
+
return _createClass(Waosm, [{
|
|
92
92
|
key: "__destroy_into_raw",
|
|
93
93
|
value: function __destroy_into_raw() {
|
|
94
94
|
var ptr = this.__wbg_ptr;
|
|
95
95
|
this.__wbg_ptr = 0;
|
|
96
|
-
|
|
96
|
+
WaosmFinalization.unregister(this);
|
|
97
97
|
return ptr;
|
|
98
98
|
}
|
|
99
99
|
}, {
|
|
100
100
|
key: "free",
|
|
101
101
|
value: function free() {
|
|
102
102
|
var ptr = this.__destroy_into_raw();
|
|
103
|
-
wasm.
|
|
103
|
+
wasm.__wbg_waosm_free(ptr, 0);
|
|
104
104
|
}
|
|
105
105
|
}, {
|
|
106
106
|
key: "compress",
|
|
107
107
|
value: function compress(data) {
|
|
108
108
|
var ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
109
109
|
var len0 = WASM_VECTOR_LEN;
|
|
110
|
-
var ret = wasm.
|
|
110
|
+
var ret = wasm.waosm_compress(this.__wbg_ptr, ptr0, len0);
|
|
111
111
|
return takeObject(ret);
|
|
112
112
|
}
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
} : new FinalizationRegistry(function (ptr) {
|
|
119
|
-
return wasm.__wbg_decompressor_free(ptr >>> 0, 1);
|
|
120
|
-
});
|
|
121
|
-
var Decompressor = exports.Decompressor = /*#__PURE__*/function () {
|
|
122
|
-
function Decompressor() {
|
|
123
|
-
_classCallCheck(this, Decompressor);
|
|
124
|
-
var ret = wasm.compressor_new();
|
|
125
|
-
this.__wbg_ptr = ret >>> 0;
|
|
126
|
-
DecompressorFinalization.register(this, this.__wbg_ptr, this);
|
|
127
|
-
return this;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* @param {Uint8Array} data
|
|
131
|
-
* @returns {Uint8Array}
|
|
132
|
-
*/
|
|
133
|
-
return _createClass(Decompressor, [{
|
|
134
|
-
key: "__destroy_into_raw",
|
|
135
|
-
value: function __destroy_into_raw() {
|
|
136
|
-
var ptr = this.__wbg_ptr;
|
|
137
|
-
this.__wbg_ptr = 0;
|
|
138
|
-
DecompressorFinalization.unregister(this);
|
|
139
|
-
return ptr;
|
|
140
|
-
}
|
|
141
|
-
}, {
|
|
142
|
-
key: "free",
|
|
143
|
-
value: function free() {
|
|
144
|
-
var ptr = this.__destroy_into_raw();
|
|
145
|
-
wasm.__wbg_decompressor_free(ptr, 0);
|
|
146
|
-
}
|
|
113
|
+
/**
|
|
114
|
+
* @param {Uint8Array} data
|
|
115
|
+
* @param {number} decompressed_size
|
|
116
|
+
* @returns {Uint8Array}
|
|
117
|
+
*/
|
|
147
118
|
}, {
|
|
148
119
|
key: "decompress",
|
|
149
|
-
value: function decompress(data) {
|
|
120
|
+
value: function decompress(data, decompressed_size) {
|
|
150
121
|
var ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
151
122
|
var len0 = WASM_VECTOR_LEN;
|
|
152
|
-
var ret = wasm.
|
|
123
|
+
var ret = wasm.waosm_decompress(this.__wbg_ptr, ptr0, len0, decompressed_size);
|
|
153
124
|
return takeObject(ret);
|
|
154
125
|
}
|
|
155
126
|
}]);
|