Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rabin-wasm

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rabin-wasm - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

11

cli/rabin-stream.js

@@ -9,3 +9,4 @@ const fs = require('fs');

const { instantiateSync } = require("@assemblyscript/loader");
const compiled = instantiateSync(fs.readFileSync(__dirname + "/../dist/rabin.wasm"), {});
const imports = {};
const compiled = instantiateSync(fs.readFileSync(__dirname + "/../dist/rabin.wasm"), imports);

@@ -22,3 +23,3 @@ module.exports = RabinStream

var max = +opts.max || 32 * 1024
this.rabin = new Rabin(compiled, avgBits, min, max)
this.rabin = new Rabin(avgBits, min, max, 64, compiled)
this.nextCb = null

@@ -67,6 +68,6 @@ this.buffers = new BufferList()

var sizes = this.rabin.fingerprint(Buffer.concat(this.pending))
this.pending = []
debug('chunks', sizes.buffer.byteLength)
debug('chunks', sizes)

@@ -90,2 +91,2 @@ for (var i = 0; i < sizes.length; i++) {

this.emit('close')
}
}
const { instantiateStreaming } = require("@assemblyscript/loader");
const { instantiate } = require("assemblyscript/lib/loader");

@@ -8,7 +8,7 @@ loadWebAssembly.supported = typeof WebAssembly !== 'undefined'

if (!loadWebAssembly.supported) return null
var wasm = new Uint8Array([0,97,115,109,1,0,0,0,1,77,14,96,2,127,127,1,127,96,1,127,0,96,1,127,1,127,96,0,0,96,3,127,127,127,1,127,96,4,127,127,127,127,0,96,3,127,127,127,0,96,1,126,1,127,96,2,126,126,1,126,96,4,127,127,127,127,1,127,96,2,127,127,0,96,1,127,1,126,96,2,127,126,0,96,0,1,127,2,13,1,3,101,110,118,5,97,98,111,114,116,0,5,3,43,42,1,0,2,1,3,10,4,13,7,8,0,6,2,9,4,3,2,10,11,12,11,12,11,12,11,12,11,12,11,12,11,12,11,12,11,12,11,12,11,12,2,10,5,3,1,0,1,6,47,9,127,1,65,0,11,127,1,65,0,11,127,0,65,3,11,127,0,65,4,11,127,1,65,0,11,127,1,65,0,11,127,1,65,0,11,127,0,65,224,1,11,127,0,65,6,11,7,192,5,39,6,109,101,109,111,114,121,2,0,7,95,95,97,108,108,111,99,0,2,8,95,95,114,101,116,97,105,110,0,3,9,95,95,114,101,108,101,97,115,101,0,4,9,95,95,99,111,108,108,101,99,116,0,5,11,95,95,114,116,116,105,95,98,97,115,101,3,7,13,73,110,116,51,50,65,114,114,97,121,95,73,68,3,2,13,85,105,110,116,56,65,114,114,97,121,95,73,68,3,3,6,100,101,103,114,101,101,0,9,3,109,111,100,0,10,5,82,97,98,105,110,3,8,14,82,97,98,105,110,35,103,101,116,58,119,112,111,115,0,17,14,82,97,98,105,110,35,115,101,116,58,119,112,111,115,0,18,15,82,97,98,105,110,35,103,101,116,58,99,111,117,110,116,0,19,15,82,97,98,105,110,35,115,101,116,58,99,111,117,110,116,0,20,13,82,97,98,105,110,35,103,101,116,58,112,111,115,0,21,13,82,97,98,105,110,35,115,101,116,58,112,111,115,0,22,15,82,97,98,105,110,35,103,101,116,58,115,116,97,114,116,0,23,15,82,97,98,105,110,35,115,101,116,58,115,116,97,114,116,0,24,16,82,97,98,105,110,35,103,101,116,58,100,105,103,101,115,116,0,25,16,82,97,98,105,110,35,115,101,116,58,100,105,103,101,115,116,0,26,21,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,115,116,97,114,116,0,27,21,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,115,116,97,114,116,0,28,22,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,108,101,110,103,116,104,0,29,22,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,108,101,110,103,116,104,0,30,31,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,99,117,116,95,102,105,110,103,101,114,112,114,105,110,116,0,31,31,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,99,117,116,95,102,105,110,103,101,114,112,114,105,110,116,0,32,20,82,97,98,105,110,35,103,101,116,58,112,111,108,121,110,111,109,105,97,108,0,33,20,82,97,98,105,110,35,115,101,116,58,112,111,108,121,110,111,109,105,97,108,0,34,17,82,97,98,105,110,35,103,101,116,58,109,105,110,115,105,122,101,0,35,17,82,97,98,105,110,35,115,101,116,58,109,105,110,115,105,122,101,0,36,17,82,97,98,105,110,35,103,101,116,58,109,97,120,115,105,122,101,0,37,17,82,97,98,105,110,35,115,101,116,58,109,97,120,115,105,122,101,0,38,14,82,97,98,105,110,35,103,101,116,58,109,97,115,107,0,39,14,82,97,98,105,110,35,115,101,116,58,109,97,115,107,0,40,16,82,97,98,105,110,35,103,101,116,58,119,105,110,100,111,119,0,41,16,82,97,98,105,110,35,115,101,116,58,119,105,110,100,111,119,0,42,17,82,97,98,105,110,35,99,111,110,115,116,114,117,99,116,111,114,0,14,17,82,97,98,105,110,35,102,105,110,103,101,114,112,114,105,110,116,0,15,8,1,16,10,241,21,42,70,1,2,127,32,0,63,0,34,2,65,16,116,34,1,75,4,64,32,2,32,0,32,1,107,65,255,255,3,106,65,128,128,124,113,65,16,118,34,1,32,2,32,1,74,27,64,0,65,0,72,4,64,32,1,64,0,65,0,72,4,64,0,11,11,11,32,0,36,1,11,82,1,3,127,32,0,65,240,255,255,255,3,75,4,64,0,11,35,1,65,16,106,34,3,32,0,65,15,106,65,112,113,34,2,65,16,32,2,65,16,75,27,34,4,106,16,1,32,3,65,16,107,34,2,32,4,54,2,0,32,2,65,127,54,2,4,32,2,32,1,54,2,8,32,2,32,0,54,2,12,32,3,11,4,0,32,0,11,3,0,1,11,3,0,1,11,140,3,1,1,127,2,64,32,1,69,13,0,32,0,65,0,58,0,0,32,0,32,1,106,65,1,107,65,0,58,0,0,32,1,65,2,77,13,0,32,0,65,1,106,65,0,58,0,0,32,0,65,2,106,65,0,58,0,0,32,0,32,1,106,34,2,65,2,107,65,0,58,0,0,32,2,65,3,107,65,0,58,0,0,32,1,65,6,77,13,0,32,0,65,3,106,65,0,58,0,0,32,0,32,1,106,65,4,107,65,0,58,0,0,32,1,65,8,77,13,0,32,1,65,0,32,0,107,65,3,113,34,1,107,33,2,32,0,32,1,106,34,0,65,0,54,2,0,32,2,65,124,113,34,1,32,0,106,65,4,107,65,0,54,2,0,32,1,65,8,77,13,0,32,0,65,4,106,65,0,54,2,0,32,0,65,8,106,65,0,54,2,0,32,0,32,1,106,34,2,65,12,107,65,0,54,2,0,32,2,65,8,107,65,0,54,2,0,32,1,65,24,77,13,0,32,0,65,12,106,65,0,54,2,0,32,0,65,16,106,65,0,54,2,0,32,0,65,20,106,65,0,54,2,0,32,0,65,24,106,65,0,54,2,0,32,0,32,1,106,34,2,65,28,107,65,0,54,2,0,32,2,65,24,107,65,0,54,2,0,32,2,65,20,107,65,0,54,2,0,32,2,65,16,107,65,0,54,2,0,32,0,65,4,113,65,24,106,34,2,32,0,106,33,0,32,1,32,2,107,33,1,3,64,32,1,65,32,79,4,64,32,0,66,0,55,3,0,32,0,65,8,106,66,0,55,3,0,32,0,65,16,106,66,0,55,3,0,32,0,65,24,106,66,0,55,3,0,32,1,65,32,107,33,1,32,0,65,32,106,33,0,12,1,11,11,11,11,110,0,32,1,65,240,255,255,255,3,32,2,118,75,4,64,65,24,65,200,0,65,23,65,56,16,0,0,11,32,1,32,2,116,34,2,65,0,16,2,34,1,32,2,16,6,32,0,69,4,64,65,12,65,2,16,2,33,0,11,32,0,65,0,54,2,0,32,0,65,0,54,2,4,32,0,65,0,54,2,8,32,0,40,2,0,26,32,0,32,1,54,2,0,32,0,32,1,54,2,4,32,0,32,2,54,2,8,32,0,11,15,0,65,12,65,5,16,2,65,128,2,65,3,16,7,11,70,2,1,127,1,126,66,128,128,128,128,128,128,128,128,128,127,33,2,3,64,2,64,32,1,65,192,0,78,13,0,32,0,32,2,131,66,0,82,4,64,65,63,32,1,107,15,5,32,2,66,1,136,33,2,32,1,65,1,106,33,1,12,2,11,0,11,11,65,127,11,170,1,2,1,127,1,126,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,3,65,0,33,2,3,64,2,64,32,2,65,192,0,78,13,0,65,63,32,2,107,32,0,32,3,131,66,0,82,13,2,26,32,3,66,1,136,33,3,32,2,65,1,106,33,2,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,3,65,0,33,2,3,64,2,64,32,2,65,192,0,78,13,0,65,63,32,2,107,32,1,32,3,131,66,0,82,13,2,26,32,3,66,1,136,33,3,32,2,65,1,106,33,2,12,1,11,11,65,127,11,107,34,2,65,0,72,69,4,64,32,1,32,2,172,134,32,0,133,33,0,12,1,11,11,32,0,11,38,0,32,1,32,0,40,2,8,79,4,64,65,128,1,65,184,1,65,148,1,65,44,16,0,0,11,32,0,40,2,4,32,1,106,45,0,0,11,40,0,32,1,32,0,40,2,8,79,4,64,65,128,1,65,184,1,65,159,1,65,44,16,0,0,11,32,0,40,2,4,32,1,106,32,2,58,0,0,11,195,6,2,4,127,5,126,35,4,69,4,64,32,0,41,3,64,33,7,3,64,32,3,65,128,2,72,4,64,32,3,65,255,1,113,173,33,6,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,5,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,5,32,6,131,66,0,82,13,2,26,32,5,66,1,136,33,5,32,1,65,1,106,33,1,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,5,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,5,32,7,131,66,0,82,13,2,26,32,5,66,1,136,33,5,32,1,65,1,106,33,1,12,1,11,11,65,127,11,107,34,2,65,0,78,4,64,32,7,32,2,172,134,32,6,133,33,6,12,1,11,11,65,0,33,1,3,64,32,1,65,63,72,4,64,32,6,66,8,134,33,6,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,5,65,0,33,2,3,64,32,2,65,192,0,72,4,64,65,63,32,2,107,32,5,32,6,131,66,0,82,13,2,26,32,5,66,1,136,33,5,32,2,65,1,106,33,2,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,5,65,0,33,2,3,64,32,2,65,192,0,72,4,64,65,63,32,2,107,32,5,32,7,131,66,0,82,13,2,26,32,5,66,1,136,33,5,32,2,65,1,106,33,2,12,1,11,11,65,127,11,107,34,2,65,0,78,4,64,32,7,32,2,172,134,32,6,133,33,6,12,1,11,11,32,1,65,1,106,33,1,12,1,11,11,35,6,40,2,4,32,3,65,3,116,106,32,6,55,3,0,32,3,65,1,106,33,3,12,1,11,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,6,65,0,33,3,3,64,32,3,65,192,0,72,4,64,65,63,32,3,107,32,6,32,7,131,66,0,82,13,2,26,32,6,66,1,136,33,6,32,3,65,1,106,33,3,12,1,11,11,65,127,11,172,33,8,65,0,33,3,3,64,32,3,65,128,2,72,4,64,35,5,33,4,32,3,172,32,8,134,34,9,33,6,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,5,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,5,32,6,131,66,0,82,13,2,26,32,5,66,1,136,33,5,32,1,65,1,106,33,1,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,5,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,5,32,7,131,66,0,82,13,2,26,32,5,66,1,136,33,5,32,1,65,1,106,33,1,12,1,11,11,65,127,11,107,34,2,65,0,78,4,64,32,7,32,2,172,134,32,6,133,33,6,12,1,11,11,32,4,40,2,4,32,3,65,3,116,106,32,6,32,9,132,55,3,0,32,3,65,1,106,33,3,12,1,11,11,65,1,36,4,11,32,0,66,0,55,3,32,32,0,65,0,54,2,0,32,0,66,0,55,3,8,32,0,66,0,55,3,32,32,0,40,2,96,32,0,40,2,0,34,2,16,11,33,1,32,0,40,2,96,32,2,65,1,16,12,32,0,32,0,41,3,32,35,6,40,2,4,32,1,65,3,116,106,41,3,0,133,55,3,32,32,0,32,2,65,1,106,65,192,0,111,54,2,0,32,0,35,5,40,2,4,32,0,41,3,32,34,7,66,45,136,167,65,255,1,113,65,3,116,106,41,3,0,32,7,66,8,134,66,1,132,133,55,3,32,32,0,11,170,1,0,32,0,69,4,64,65,228,0,65,6,16,2,33,0,11,32,0,65,0,54,2,0,32,0,66,0,55,3,8,32,0,66,0,55,3,16,32,0,66,0,55,3,24,32,0,66,0,55,3,32,32,0,66,0,55,3,40,32,0,66,0,55,3,48,32,0,66,0,55,3,56,32,0,66,0,55,3,64,32,0,66,0,55,3,72,32,0,66,0,55,3,80,32,0,66,0,55,3,88,32,0,65,12,65,4,16,2,65,192,0,65,0,16,7,54,2,96,32,0,32,2,173,55,3,72,32,0,32,3,173,55,3,80,32,0,66,1,32,1,173,134,66,1,125,55,3,88,32,0,66,243,130,183,218,216,230,232,30,55,3,64,32,0,16,13,26,32,0,11,129,4,2,6,127,6,126,32,1,40,2,8,33,5,32,1,40,2,4,33,6,3,64,2,127,32,0,41,3,16,33,10,32,0,41,3,8,33,9,32,0,41,3,88,33,11,32,0,41,3,72,33,12,32,0,41,3,80,33,13,65,0,33,1,3,64,32,1,32,5,72,4,64,32,1,32,6,106,45,0,0,33,3,32,0,40,2,96,32,0,40,2,0,34,4,16,11,33,7,32,0,40,2,96,32,4,32,3,16,12,32,0,32,0,41,3,32,35,6,40,2,4,32,7,65,3,116,106,41,3,0,133,55,3,32,32,0,32,4,65,1,106,65,192,0,111,54,2,0,32,0,35,5,40,2,4,32,0,41,3,32,34,14,66,45,136,167,65,255,1,113,65,3,116,106,41,3,0,32,3,173,32,14,66,8,134,132,133,55,3,32,32,10,66,1,124,33,10,32,9,66,1,124,34,9,32,12,90,4,127,32,0,41,3,32,32,11,131,80,5,65,0,11,4,127,65,1,5,32,9,32,13,90,11,4,64,32,0,32,0,41,3,24,55,3,40,32,0,32,9,55,3,48,32,0,32,0,41,3,32,55,3,56,32,0,32,10,55,3,16,32,0,32,9,55,3,8,32,0,66,0,55,3,32,32,0,65,0,54,2,0,32,0,66,0,55,3,8,32,0,66,0,55,3,32,32,0,40,2,96,32,0,40,2,0,34,3,16,11,33,4,32,0,40,2,96,32,3,65,1,16,12,32,0,32,0,41,3,32,35,6,40,2,4,32,4,65,3,116,106,41,3,0,133,55,3,32,32,0,32,3,65,1,106,65,192,0,111,54,2,0,32,0,35,5,40,2,4,32,0,41,3,32,34,9,66,45,136,167,65,255,1,113,65,3,116,106,41,3,0,32,9,66,8,134,66,1,132,133,55,3,32,32,0,40,2,96,40,2,4,65,192,0,16,6,32,1,65,1,106,12,3,5,32,1,65,1,106,33,1,12,2,11,0,11,11,32,0,32,10,55,3,16,32,0,32,9,55,3,8,65,127,11,34,1,65,0,78,4,64,32,5,32,1,107,33,5,32,1,32,6,106,33,6,32,2,40,2,4,32,8,65,1,106,34,8,65,2,116,106,32,0,41,3,48,62,2,0,12,1,11,11,32,2,11,20,0,65,160,2,36,0,65,160,2,36,1,16,8,36,5,16,8,36,6,11,7,0,32,0,40,2,0,11,9,0,32,0,32,1,54,2,0,11,7,0,32,0,41,3,8,11,9,0,32,0,32,1,55,3,8,11,7,0,32,0,41,3,16,11,9,0,32,0,32,1,55,3,16,11,7,0,32,0,41,3,24,11,9,0,32,0,32,1,55,3,24,11,7,0,32,0,41,3,32,11,9,0,32,0,32,1,55,3,32,11,7,0,32,0,41,3,40,11,9,0,32,0,32,1,55,3,40,11,7,0,32,0,41,3,48,11,9,0,32,0,32,1,55,3,48,11,7,0,32,0,41,3,56,11,9,0,32,0,32,1,55,3,56,11,7,0,32,0,41,3,64,11,9,0,32,0,32,1,55,3,64,11,7,0,32,0,41,3,72,11,9,0,32,0,32,1,55,3,72,11,7,0,32,0,41,3,80,11,9,0,32,0,32,1,55,3,80,11,7,0,32,0,41,3,88,11,9,0,32,0,32,1,55,3,88,11,7,0,32,0,40,2,96,11,15,0,32,1,40,2,96,26,32,0,32,1,54,2,96,11,11,152,2,5,0,65,8,11,43,28,0,0,0,1,0,0,0,1,0,0,0,28,0,0,0,73,0,110,0,118,0,97,0,108,0,105,0,100,0,32,0,108,0,101,0,110,0,103,0,116,0,104,0,65,56,11,53,38,0,0,0,1,0,0,0,1,0,0,0,38,0,0,0,126,0,108,0,105,0,98,0,47,0,97,0,114,0,114,0,97,0,121,0,98,0,117,0,102,0,102,0,101,0,114,0,46,0,116,0,115,0,65,240,0,11,51,36,0,0,0,1,0,0,0,1,0,0,0,36,0,0,0,73,0,110,0,100,0,101,0,120,0,32,0,111,0,117,0,116,0,32,0,111,0,102,0,32,0,114,0,97,0,110,0,103,0,101,0,65,168,1,11,51,36,0,0,0,1,0,0,0,1,0,0,0,36,0,0,0,126,0,108,0,105,0,98,0,47,0,116,0,121,0,112,0,101,0,100,0,97,0,114,0,114,0,97,0,121,0,46,0,116,0,115,0,65,224,1,11,53,7,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,145,4,0,0,2,0,0,0,49,0,0,0,2,0,0,0,17,1,0,0,2,0,0,0,16,0,32,16,115,111,117,114,99,101,77,97,112,112,105,110,103,85,82,76,14,114,97,98,105,110,46,119,97,115,109,46,109,97,112])
var wasm = new Uint8Array([0,97,115,109,1,0,0,0,1,90,16,96,2,127,126,0,96,1,127,1,126,96,2,127,127,0,96,1,127,1,127,96,0,0,96,1,127,0,96,2,127,127,1,127,96,3,127,127,127,1,127,96,3,127,127,127,0,96,4,127,127,127,127,0,96,3,127,127,126,0,96,0,1,127,96,5,127,127,127,127,127,1,127,96,1,126,1,127,96,2,127,127,1,126,96,2,126,126,1,126,2,13,1,3,101,110,118,5,97,98,111,114,116,0,9,3,54,53,5,6,3,5,4,4,2,7,11,13,15,10,8,6,14,5,12,3,2,3,2,3,2,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,7,4,5,3,1,0,1,6,47,9,127,1,65,0,11,127,1,65,0,11,127,0,65,3,11,127,0,65,4,11,127,1,65,0,11,127,1,65,0,11,127,1,65,0,11,127,0,65,128,2,11,127,0,65,6,11,7,162,7,48,6,109,101,109,111,114,121,2,0,7,95,95,97,108,108,111,99,0,2,8,95,95,114,101,116,97,105,110,0,3,9,95,95,114,101,108,101,97,115,101,0,4,9,95,95,99,111,108,108,101,99,116,0,5,7,95,95,114,101,115,101,116,0,6,11,95,95,114,116,116,105,95,98,97,115,101,3,7,13,73,110,116,51,50,65,114,114,97,121,95,73,68,3,2,13,85,105,110,116,56,65,114,114,97,121,95,73,68,3,3,6,100,101,103,114,101,101,0,10,3,109,111,100,0,11,5,82,97,98,105,110,3,8,16,82,97,98,105,110,35,103,101,116,58,119,105,110,100,111,119,0,18,16,82,97,98,105,110,35,115,101,116,58,119,105,110,100,111,119,0,19,21,82,97,98,105,110,35,103,101,116,58,119,105,110,100,111,119,95,115,105,122,101,0,20,21,82,97,98,105,110,35,115,101,116,58,119,105,110,100,111,119,95,115,105,122,101,0,21,14,82,97,98,105,110,35,103,101,116,58,119,112,111,115,0,22,14,82,97,98,105,110,35,115,101,116,58,119,112,111,115,0,23,15,82,97,98,105,110,35,103,101,116,58,99,111,117,110,116,0,24,15,82,97,98,105,110,35,115,101,116,58,99,111,117,110,116,0,25,13,82,97,98,105,110,35,103,101,116,58,112,111,115,0,26,13,82,97,98,105,110,35,115,101,116,58,112,111,115,0,27,15,82,97,98,105,110,35,103,101,116,58,115,116,97,114,116,0,28,15,82,97,98,105,110,35,115,101,116,58,115,116,97,114,116,0,29,16,82,97,98,105,110,35,103,101,116,58,100,105,103,101,115,116,0,30,16,82,97,98,105,110,35,115,101,116,58,100,105,103,101,115,116,0,31,21,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,115,116,97,114,116,0,32,21,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,115,116,97,114,116,0,33,22,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,108,101,110,103,116,104,0,34,22,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,108,101,110,103,116,104,0,35,31,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,99,117,116,95,102,105,110,103,101,114,112,114,105,110,116,0,36,31,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,99,117,116,95,102,105,110,103,101,114,112,114,105,110,116,0,37,20,82,97,98,105,110,35,103,101,116,58,112,111,108,121,110,111,109,105,97,108,0,38,20,82,97,98,105,110,35,115,101,116,58,112,111,108,121,110,111,109,105,97,108,0,39,27,82,97,98,105,110,35,103,101,116,58,112,111,108,121,110,111,109,105,97,108,95,100,101,103,114,101,101,0,40,27,82,97,98,105,110,35,115,101,116,58,112,111,108,121,110,111,109,105,97,108,95,100,101,103,114,101,101,0,41,26,82,97,98,105,110,35,103,101,116,58,112,111,108,121,110,111,109,105,97,108,95,115,104,105,102,116,0,42,26,82,97,98,105,110,35,115,101,116,58,112,111,108,121,110,111,109,105,97,108,95,115,104,105,102,116,0,43,22,82,97,98,105,110,35,103,101,116,58,97,118,101,114,97,103,101,95,98,105,116,115,0,44,22,82,97,98,105,110,35,115,101,116,58,97,118,101,114,97,103,101,95,98,105,116,115,0,45,17,82,97,98,105,110,35,103,101,116,58,109,105,110,115,105,122,101,0,46,17,82,97,98,105,110,35,115,101,116,58,109,105,110,115,105,122,101,0,47,17,82,97,98,105,110,35,103,101,116,58,109,97,120,115,105,122,101,0,48,17,82,97,98,105,110,35,115,101,116,58,109,97,120,115,105,122,101,0,49,14,82,97,98,105,110,35,103,101,116,58,109,97,115,107,0,50,14,82,97,98,105,110,35,115,101,116,58,109,97,115,107,0,51,17,82,97,98,105,110,35,99,111,110,115,116,114,117,99,116,111,114,0,17,17,82,97,98,105,110,35,102,105,110,103,101,114,112,114,105,110,116,0,52,8,1,53,10,129,25,53,70,1,2,127,32,0,63,0,34,2,65,16,116,34,1,75,4,64,32,2,32,0,32,1,107,65,255,255,3,106,65,128,128,124,113,65,16,118,34,1,32,2,32,1,74,27,64,0,65,0,72,4,64,32,1,64,0,65,0,72,4,64,0,11,11,11,32,0,36,1,11,82,1,3,127,32,0,65,240,255,255,255,3,75,4,64,0,11,35,1,65,16,106,34,3,32,0,65,15,106,65,112,113,34,2,65,16,32,2,65,16,75,27,34,4,106,16,1,32,3,65,16,107,34,2,32,4,54,2,0,32,2,65,1,54,2,4,32,2,32,1,54,2,8,32,2,32,0,54,2,12,32,3,11,4,0,32,0,11,3,0,1,11,3,0,1,11,6,0,35,0,36,1,11,37,1,1,127,3,64,32,1,4,64,32,0,34,2,65,1,106,33,0,32,2,65,0,58,0,0,32,1,65,1,107,33,1,12,1,11,11,11,110,0,32,1,65,240,255,255,255,3,32,2,118,75,4,64,65,32,65,208,0,65,23,65,56,16,0,0,11,32,1,32,2,116,34,2,65,0,16,2,34,1,32,2,16,7,32,0,69,4,64,65,12,65,2,16,2,33,0,11,32,0,65,0,54,2,0,32,0,65,0,54,2,4,32,0,65,0,54,2,8,32,0,40,2,0,26,32,0,32,1,54,2,0,32,0,32,1,54,2,4,32,0,32,2,54,2,8,32,0,11,15,0,65,12,65,5,16,2,65,128,2,65,3,16,8,11,66,2,1,127,1,126,66,128,128,128,128,128,128,128,128,128,127,33,2,3,64,32,1,65,192,0,72,4,64,32,0,32,2,131,66,0,86,4,64,65,63,32,1,107,15,11,32,2,66,1,136,33,2,32,1,65,1,106,33,1,12,1,11,11,65,127,11,167,2,2,1,127,2,126,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,3,65,0,33,2,3,64,32,2,65,192,0,72,4,64,65,63,32,2,107,32,0,32,3,131,66,0,86,13,2,26,32,3,66,1,136,33,3,32,2,65,1,106,33,2,12,1,11,11,65,127,11,2,127,32,1,33,4,66,128,128,128,128,128,128,128,128,128,127,33,3,65,0,33,2,3,64,32,2,65,192,0,72,4,64,65,63,32,2,107,32,3,32,4,131,66,0,86,13,2,26,32,3,66,1,136,33,3,32,2,65,1,106,33,2,12,1,11,11,65,127,11,78,4,64,32,0,32,1,2,127,66,128,128,128,128,128,128,128,128,128,127,33,3,65,0,33,2,3,64,32,2,65,192,0,72,4,64,65,63,32,2,107,32,0,32,3,131,66,0,86,13,2,26,32,3,66,1,136,33,3,32,2,65,1,106,33,2,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,3,65,0,33,2,3,64,32,2,65,192,0,72,4,64,65,63,32,2,107,32,1,32,3,131,66,0,86,13,2,26,32,3,66,1,136,33,3,32,2,65,1,106,33,2,12,1,11,11,65,127,11,107,172,134,133,33,0,12,1,11,11,32,0,11,18,0,32,0,40,2,4,32,1,65,3,116,106,32,2,55,3,0,11,40,0,32,1,32,0,40,2,8,79,4,64,65,144,1,65,208,1,65,163,1,65,44,16,0,0,11,32,1,32,0,40,2,4,106,32,2,58,0,0,11,38,0,32,1,32,0,40,2,8,79,4,64,65,144,1,65,208,1,65,152,1,65,44,16,0,0,11,32,1,32,0,40,2,4,106,45,0,0,11,16,0,32,0,40,2,4,32,1,65,3,116,106,41,3,0,11,131,10,2,3,127,6,126,32,0,33,2,35,4,69,4,64,3,64,32,3,65,128,2,72,4,64,32,3,65,255,1,113,173,33,5,32,2,41,3,72,33,6,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,4,32,5,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,1,65,1,106,33,1,12,1,11,11,65,127,11,2,127,32,6,33,7,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,4,32,7,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,1,65,1,106,33,1,12,1,11,11,65,127,11,78,4,64,32,5,32,6,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,0,3,64,32,0,65,192,0,72,4,64,65,63,32,0,107,32,4,32,5,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,0,65,1,106,33,0,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,0,3,64,32,0,65,192,0,72,4,64,65,63,32,0,107,32,4,32,6,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,0,65,1,106,33,0,12,1,11,11,65,127,11,107,172,134,133,33,5,12,1,11,11,65,0,33,1,3,64,32,1,32,2,40,2,4,65,1,107,72,4,64,32,5,66,8,134,33,5,32,2,41,3,72,33,6,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,0,3,64,32,0,65,192,0,72,4,64,65,63,32,0,107,32,4,32,5,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,0,65,1,106,33,0,12,1,11,11,65,127,11,2,127,32,6,33,7,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,0,3,64,32,0,65,192,0,72,4,64,65,63,32,0,107,32,4,32,7,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,0,65,1,106,33,0,12,1,11,11,65,127,11,78,4,64,32,5,32,6,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,0,3,64,32,0,65,192,0,72,4,64,65,63,32,0,107,32,4,32,5,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,0,65,1,106,33,0,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,0,3,64,32,0,65,192,0,72,4,64,65,63,32,0,107,32,4,32,6,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,0,65,1,106,33,0,12,1,11,11,65,127,11,107,172,134,133,33,5,12,1,11,11,32,1,65,1,106,33,1,12,1,11,11,35,6,32,3,32,5,16,12,32,3,65,1,106,33,3,12,1,11,11,2,127,32,2,41,3,72,33,7,66,128,128,128,128,128,128,128,128,128,127,33,5,65,0,33,3,3,64,32,3,65,192,0,72,4,64,65,63,32,3,107,32,5,32,7,131,66,0,86,13,2,26,32,5,66,1,136,33,5,32,3,65,1,106,33,3,12,1,11,11,65,127,11,172,33,8,65,0,33,3,3,64,32,3,65,128,2,72,4,64,35,5,33,0,32,3,172,32,8,134,34,9,33,5,32,2,41,3,72,33,6,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,4,32,5,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,1,65,1,106,33,1,12,1,11,11,65,127,11,2,127,32,6,33,7,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,4,32,7,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,1,65,1,106,33,1,12,1,11,11,65,127,11,78,4,64,32,5,32,6,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,4,32,5,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,1,65,1,106,33,1,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,4,32,6,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,1,65,1,106,33,1,12,1,11,11,65,127,11,107,172,134,133,33,5,12,1,11,11,32,0,32,3,32,5,32,9,132,16,12,32,3,65,1,106,33,3,12,1,11,11,65,1,36,4,11,32,2,66,0,55,3,24,32,2,66,0,55,3,32,65,0,33,0,3,64,32,0,32,2,40,2,4,72,4,64,32,2,40,2,0,32,0,65,0,16,13,32,0,65,1,106,33,0,12,1,11,11,32,2,66,0,55,3,40,32,2,65,0,54,2,8,32,2,66,0,55,3,16,32,2,66,0,55,3,40,32,2,40,2,0,32,2,40,2,8,16,14,33,0,32,2,40,2,0,32,2,40,2,8,65,1,16,13,32,2,32,2,41,3,40,35,6,32,0,16,15,133,55,3,40,32,2,32,2,40,2,8,65,1,106,32,2,40,2,4,111,54,2,8,32,2,35,5,32,2,41,3,40,34,7,32,2,41,3,88,136,167,65,255,1,113,16,15,32,7,66,8,134,66,1,132,133,55,3,40,11,250,1,0,32,0,69,4,64,65,128,1,65,6,16,2,33,0,11,32,0,65,0,54,2,0,32,0,65,0,54,2,4,32,0,65,0,54,2,8,32,0,66,0,55,3,16,32,0,66,0,55,3,24,32,0,66,0,55,3,32,32,0,66,0,55,3,40,32,0,66,0,55,3,48,32,0,66,0,55,3,56,32,0,66,0,55,3,64,32,0,66,0,55,3,72,32,0,66,0,55,3,80,32,0,66,0,55,3,88,32,0,66,0,55,3,96,32,0,66,0,55,3,104,32,0,66,0,55,3,112,32,0,66,0,55,3,120,32,0,32,1,173,55,3,96,32,0,32,2,173,55,3,104,32,0,32,3,173,55,3,112,65,12,65,4,16,2,32,4,65,0,16,8,33,1,32,0,40,2,0,26,32,0,32,1,54,2,0,32,0,32,4,54,2,4,32,0,66,1,32,0,41,3,96,134,66,1,125,55,3,120,32,0,66,243,130,183,218,216,230,232,30,55,3,72,32,0,66,53,55,3,80,32,0,32,0,41,3,80,66,8,125,55,3,88,32,0,16,16,32,0,11,7,0,32,0,40,2,0,11,15,0,32,0,40,2,0,26,32,0,32,1,54,2,0,11,7,0,32,0,40,2,4,11,9,0,32,0,32,1,54,2,4,11,7,0,32,0,40,2,8,11,9,0,32,0,32,1,54,2,8,11,7,0,32,0,41,3,16,11,9,0,32,0,32,1,55,3,16,11,7,0,32,0,41,3,24,11,9,0,32,0,32,1,55,3,24,11,7,0,32,0,41,3,32,11,9,0,32,0,32,1,55,3,32,11,7,0,32,0,41,3,40,11,9,0,32,0,32,1,55,3,40,11,7,0,32,0,41,3,48,11,9,0,32,0,32,1,55,3,48,11,7,0,32,0,41,3,56,11,9,0,32,0,32,1,55,3,56,11,7,0,32,0,41,3,64,11,9,0,32,0,32,1,55,3,64,11,7,0,32,0,41,3,72,11,9,0,32,0,32,1,55,3,72,11,7,0,32,0,41,3,80,11,9,0,32,0,32,1,55,3,80,11,7,0,32,0,41,3,88,11,9,0,32,0,32,1,55,3,88,11,7,0,32,0,41,3,96,11,9,0,32,0,32,1,55,3,96,11,7,0,32,0,41,3,104,11,9,0,32,0,32,1,55,3,104,11,7,0,32,0,41,3,112,11,9,0,32,0,32,1,55,3,112,11,7,0,32,0,41,3,120,11,9,0,32,0,32,1,55,3,120,11,253,3,2,5,127,1,126,32,2,33,7,32,1,34,2,40,2,8,33,5,65,0,33,1,32,2,40,2,4,33,6,3,64,2,127,65,0,33,4,3,64,32,4,32,5,72,4,64,32,4,32,6,106,45,0,0,33,2,32,0,40,2,0,32,0,40,2,8,16,14,33,3,32,0,40,2,0,32,0,40,2,8,32,2,16,13,32,0,32,0,41,3,40,35,6,32,3,16,15,133,55,3,40,32,0,32,0,40,2,8,65,1,106,32,0,40,2,4,111,54,2,8,32,0,35,5,32,0,41,3,40,34,8,32,0,41,3,88,136,167,65,255,1,113,16,15,32,2,173,32,8,66,8,134,132,133,55,3,40,32,0,32,0,41,3,16,66,1,124,55,3,16,32,0,32,0,41,3,24,66,1,124,55,3,24,32,0,41,3,16,32,0,41,3,104,90,4,127,32,0,41,3,40,32,0,41,3,120,131,80,5,65,0,11,4,127,65,1,5,32,0,41,3,16,32,0,41,3,112,90,11,4,64,32,0,32,0,41,3,32,55,3,48,32,0,32,0,41,3,16,55,3,56,32,0,32,0,41,3,40,55,3,64,32,0,33,2,65,0,33,3,3,64,32,3,32,2,40,2,4,72,4,64,32,2,40,2,0,32,3,65,0,16,13,32,3,65,1,106,33,3,12,1,11,11,32,2,66,0,55,3,40,32,2,65,0,54,2,8,32,2,66,0,55,3,16,32,2,66,0,55,3,40,32,2,40,2,0,32,2,40,2,8,16,14,33,3,32,2,40,2,0,32,2,40,2,8,65,1,16,13,32,2,32,2,41,3,40,35,6,32,3,16,15,133,55,3,40,32,2,32,2,40,2,8,65,1,106,32,2,40,2,4,111,54,2,8,32,2,35,5,32,2,41,3,40,34,8,32,2,41,3,88,136,167,65,255,1,113,16,15,32,8,66,8,134,66,1,132,133,55,3,40,32,4,65,1,106,12,3,11,32,4,65,1,106,33,4,12,1,11,11,65,127,11,34,2,65,0,78,4,64,32,5,32,2,107,33,5,32,2,32,6,106,33,6,32,1,34,2,65,1,106,33,1,32,7,40,2,4,32,2,65,2,116,106,32,0,41,3,56,62,2,0,12,1,11,11,32,7,11,20,0,65,192,2,36,0,65,192,2,36,1,16,9,36,5,16,9,36,6,11,11,153,2,5,0,65,16,11,43,28,0,0,0,1,0,0,0,1,0,0,0,28,0,0,0,73,0,110,0,118,0,97,0,108,0,105,0,100,0,32,0,108,0,101,0,110,0,103,0,116,0,104,0,65,192,0,11,53,38,0,0,0,1,0,0,0,1,0,0,0,38,0,0,0,126,0,108,0,105,0,98,0,47,0,97,0,114,0,114,0,97,0,121,0,98,0,117,0,102,0,102,0,101,0,114,0,46,0,116,0,115,0,65,128,1,11,51,36,0,0,0,1,0,0,0,1,0,0,0,36,0,0,0,73,0,110,0,100,0,101,0,120,0,32,0,111,0,117,0,116,0,32,0,111,0,102,0,32,0,114,0,97,0,110,0,103,0,101,0,65,192,1,11,51,36,0,0,0,1,0,0,0,1,0,0,0,36,0,0,0,126,0,108,0,105,0,98,0,47,0,116,0,121,0,112,0,101,0,100,0,97,0,114,0,114,0,97,0,121,0,46,0,116,0,115,0,65,128,2,11,53,7,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,145,4,0,0,2,0,0,0,49,0,0,0,2,0,0,0,17,1,0,0,2,0,0,0,16,0,34,16,115,111,117,114,99,101,77,97,112,112,105,110,103,85,82,76,16,46,47,114,97,98,105,110,46,119,97,115,109,46,109,97,112])
// make it work async because browsers throw when a wasm module is bigger than 4kb and load sync
return instantiateStreaming(new Response(new Blob([wasm], {type: 'application/wasm'})), imp)
return instantiate(new Response(new Blob([wasm], {type: 'application/wasm'})), imp)
}
module.exports = loadWebAssembly
const { instantiateSync } = require("@assemblyscript/loader");
const { instantiateSync } = require("assemblyscript/lib/loader");
const fs = require('fs')

@@ -9,5 +9,5 @@

if (!loadWebAssembly.supported) return null
return instantiateSync(fs.readFileSync(__dirname + "/../dist/rabin.wasm"), imp);
}
module.exports = loadWebAssembly

@@ -15,2 +15,3 @@ declare module ASModule {

export function __collect(): void;
export function __reset(): void;
export var __rtti_base: u32;

@@ -22,3 +23,20 @@ export var Int32Array_ID: u32;

export class Rabin {
constructor(average_bits: u32, minsize: u32, maxsize: u32);
window: u32;
window_size: i32;
wpos: i32;
count: U64;
pos: U64;
start: U64;
digest: U64;
chunk_start: U64;
chunk_length: U64;
chunk_cut_fingerprint: U64;
polynomial: U64;
polynomial_degree: U64;
polynomial_shift: U64;
average_bits: U64;
minsize: U64;
maxsize: U64;
mask: U64;
constructor(average_bits: u32, minsize: u32, maxsize: u32, window_size: i32);
fingerprint(buf: u32, lengths: u32): u32;

@@ -25,0 +43,0 @@ }

(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Rabin = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
const { instantiateStreaming } = require("@assemblyscript/loader");
const { instantiate } = require("assemblyscript/lib/loader");

@@ -9,10 +9,10 @@ loadWebAssembly.supported = typeof WebAssembly !== 'undefined'

if (!loadWebAssembly.supported) return null
var wasm = new Uint8Array([0,97,115,109,1,0,0,0,1,77,14,96,2,127,127,1,127,96,1,127,0,96,1,127,1,127,96,0,0,96,3,127,127,127,1,127,96,4,127,127,127,127,0,96,3,127,127,127,0,96,1,126,1,127,96,2,126,126,1,126,96,4,127,127,127,127,1,127,96,2,127,127,0,96,1,127,1,126,96,2,127,126,0,96,0,1,127,2,13,1,3,101,110,118,5,97,98,111,114,116,0,5,3,43,42,1,0,2,1,3,10,4,13,7,8,0,6,2,9,4,3,2,10,11,12,11,12,11,12,11,12,11,12,11,12,11,12,11,12,11,12,11,12,11,12,2,10,5,3,1,0,1,6,47,9,127,1,65,0,11,127,1,65,0,11,127,0,65,3,11,127,0,65,4,11,127,1,65,0,11,127,1,65,0,11,127,1,65,0,11,127,0,65,224,1,11,127,0,65,6,11,7,192,5,39,6,109,101,109,111,114,121,2,0,7,95,95,97,108,108,111,99,0,2,8,95,95,114,101,116,97,105,110,0,3,9,95,95,114,101,108,101,97,115,101,0,4,9,95,95,99,111,108,108,101,99,116,0,5,11,95,95,114,116,116,105,95,98,97,115,101,3,7,13,73,110,116,51,50,65,114,114,97,121,95,73,68,3,2,13,85,105,110,116,56,65,114,114,97,121,95,73,68,3,3,6,100,101,103,114,101,101,0,9,3,109,111,100,0,10,5,82,97,98,105,110,3,8,14,82,97,98,105,110,35,103,101,116,58,119,112,111,115,0,17,14,82,97,98,105,110,35,115,101,116,58,119,112,111,115,0,18,15,82,97,98,105,110,35,103,101,116,58,99,111,117,110,116,0,19,15,82,97,98,105,110,35,115,101,116,58,99,111,117,110,116,0,20,13,82,97,98,105,110,35,103,101,116,58,112,111,115,0,21,13,82,97,98,105,110,35,115,101,116,58,112,111,115,0,22,15,82,97,98,105,110,35,103,101,116,58,115,116,97,114,116,0,23,15,82,97,98,105,110,35,115,101,116,58,115,116,97,114,116,0,24,16,82,97,98,105,110,35,103,101,116,58,100,105,103,101,115,116,0,25,16,82,97,98,105,110,35,115,101,116,58,100,105,103,101,115,116,0,26,21,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,115,116,97,114,116,0,27,21,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,115,116,97,114,116,0,28,22,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,108,101,110,103,116,104,0,29,22,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,108,101,110,103,116,104,0,30,31,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,99,117,116,95,102,105,110,103,101,114,112,114,105,110,116,0,31,31,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,99,117,116,95,102,105,110,103,101,114,112,114,105,110,116,0,32,20,82,97,98,105,110,35,103,101,116,58,112,111,108,121,110,111,109,105,97,108,0,33,20,82,97,98,105,110,35,115,101,116,58,112,111,108,121,110,111,109,105,97,108,0,34,17,82,97,98,105,110,35,103,101,116,58,109,105,110,115,105,122,101,0,35,17,82,97,98,105,110,35,115,101,116,58,109,105,110,115,105,122,101,0,36,17,82,97,98,105,110,35,103,101,116,58,109,97,120,115,105,122,101,0,37,17,82,97,98,105,110,35,115,101,116,58,109,97,120,115,105,122,101,0,38,14,82,97,98,105,110,35,103,101,116,58,109,97,115,107,0,39,14,82,97,98,105,110,35,115,101,116,58,109,97,115,107,0,40,16,82,97,98,105,110,35,103,101,116,58,119,105,110,100,111,119,0,41,16,82,97,98,105,110,35,115,101,116,58,119,105,110,100,111,119,0,42,17,82,97,98,105,110,35,99,111,110,115,116,114,117,99,116,111,114,0,14,17,82,97,98,105,110,35,102,105,110,103,101,114,112,114,105,110,116,0,15,8,1,16,10,241,21,42,70,1,2,127,32,0,63,0,34,2,65,16,116,34,1,75,4,64,32,2,32,0,32,1,107,65,255,255,3,106,65,128,128,124,113,65,16,118,34,1,32,2,32,1,74,27,64,0,65,0,72,4,64,32,1,64,0,65,0,72,4,64,0,11,11,11,32,0,36,1,11,82,1,3,127,32,0,65,240,255,255,255,3,75,4,64,0,11,35,1,65,16,106,34,3,32,0,65,15,106,65,112,113,34,2,65,16,32,2,65,16,75,27,34,4,106,16,1,32,3,65,16,107,34,2,32,4,54,2,0,32,2,65,127,54,2,4,32,2,32,1,54,2,8,32,2,32,0,54,2,12,32,3,11,4,0,32,0,11,3,0,1,11,3,0,1,11,140,3,1,1,127,2,64,32,1,69,13,0,32,0,65,0,58,0,0,32,0,32,1,106,65,1,107,65,0,58,0,0,32,1,65,2,77,13,0,32,0,65,1,106,65,0,58,0,0,32,0,65,2,106,65,0,58,0,0,32,0,32,1,106,34,2,65,2,107,65,0,58,0,0,32,2,65,3,107,65,0,58,0,0,32,1,65,6,77,13,0,32,0,65,3,106,65,0,58,0,0,32,0,32,1,106,65,4,107,65,0,58,0,0,32,1,65,8,77,13,0,32,1,65,0,32,0,107,65,3,113,34,1,107,33,2,32,0,32,1,106,34,0,65,0,54,2,0,32,2,65,124,113,34,1,32,0,106,65,4,107,65,0,54,2,0,32,1,65,8,77,13,0,32,0,65,4,106,65,0,54,2,0,32,0,65,8,106,65,0,54,2,0,32,0,32,1,106,34,2,65,12,107,65,0,54,2,0,32,2,65,8,107,65,0,54,2,0,32,1,65,24,77,13,0,32,0,65,12,106,65,0,54,2,0,32,0,65,16,106,65,0,54,2,0,32,0,65,20,106,65,0,54,2,0,32,0,65,24,106,65,0,54,2,0,32,0,32,1,106,34,2,65,28,107,65,0,54,2,0,32,2,65,24,107,65,0,54,2,0,32,2,65,20,107,65,0,54,2,0,32,2,65,16,107,65,0,54,2,0,32,0,65,4,113,65,24,106,34,2,32,0,106,33,0,32,1,32,2,107,33,1,3,64,32,1,65,32,79,4,64,32,0,66,0,55,3,0,32,0,65,8,106,66,0,55,3,0,32,0,65,16,106,66,0,55,3,0,32,0,65,24,106,66,0,55,3,0,32,1,65,32,107,33,1,32,0,65,32,106,33,0,12,1,11,11,11,11,110,0,32,1,65,240,255,255,255,3,32,2,118,75,4,64,65,24,65,200,0,65,23,65,56,16,0,0,11,32,1,32,2,116,34,2,65,0,16,2,34,1,32,2,16,6,32,0,69,4,64,65,12,65,2,16,2,33,0,11,32,0,65,0,54,2,0,32,0,65,0,54,2,4,32,0,65,0,54,2,8,32,0,40,2,0,26,32,0,32,1,54,2,0,32,0,32,1,54,2,4,32,0,32,2,54,2,8,32,0,11,15,0,65,12,65,5,16,2,65,128,2,65,3,16,7,11,70,2,1,127,1,126,66,128,128,128,128,128,128,128,128,128,127,33,2,3,64,2,64,32,1,65,192,0,78,13,0,32,0,32,2,131,66,0,82,4,64,65,63,32,1,107,15,5,32,2,66,1,136,33,2,32,1,65,1,106,33,1,12,2,11,0,11,11,65,127,11,170,1,2,1,127,1,126,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,3,65,0,33,2,3,64,2,64,32,2,65,192,0,78,13,0,65,63,32,2,107,32,0,32,3,131,66,0,82,13,2,26,32,3,66,1,136,33,3,32,2,65,1,106,33,2,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,3,65,0,33,2,3,64,2,64,32,2,65,192,0,78,13,0,65,63,32,2,107,32,1,32,3,131,66,0,82,13,2,26,32,3,66,1,136,33,3,32,2,65,1,106,33,2,12,1,11,11,65,127,11,107,34,2,65,0,72,69,4,64,32,1,32,2,172,134,32,0,133,33,0,12,1,11,11,32,0,11,38,0,32,1,32,0,40,2,8,79,4,64,65,128,1,65,184,1,65,148,1,65,44,16,0,0,11,32,0,40,2,4,32,1,106,45,0,0,11,40,0,32,1,32,0,40,2,8,79,4,64,65,128,1,65,184,1,65,159,1,65,44,16,0,0,11,32,0,40,2,4,32,1,106,32,2,58,0,0,11,195,6,2,4,127,5,126,35,4,69,4,64,32,0,41,3,64,33,7,3,64,32,3,65,128,2,72,4,64,32,3,65,255,1,113,173,33,6,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,5,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,5,32,6,131,66,0,82,13,2,26,32,5,66,1,136,33,5,32,1,65,1,106,33,1,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,5,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,5,32,7,131,66,0,82,13,2,26,32,5,66,1,136,33,5,32,1,65,1,106,33,1,12,1,11,11,65,127,11,107,34,2,65,0,78,4,64,32,7,32,2,172,134,32,6,133,33,6,12,1,11,11,65,0,33,1,3,64,32,1,65,63,72,4,64,32,6,66,8,134,33,6,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,5,65,0,33,2,3,64,32,2,65,192,0,72,4,64,65,63,32,2,107,32,5,32,6,131,66,0,82,13,2,26,32,5,66,1,136,33,5,32,2,65,1,106,33,2,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,5,65,0,33,2,3,64,32,2,65,192,0,72,4,64,65,63,32,2,107,32,5,32,7,131,66,0,82,13,2,26,32,5,66,1,136,33,5,32,2,65,1,106,33,2,12,1,11,11,65,127,11,107,34,2,65,0,78,4,64,32,7,32,2,172,134,32,6,133,33,6,12,1,11,11,32,1,65,1,106,33,1,12,1,11,11,35,6,40,2,4,32,3,65,3,116,106,32,6,55,3,0,32,3,65,1,106,33,3,12,1,11,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,6,65,0,33,3,3,64,32,3,65,192,0,72,4,64,65,63,32,3,107,32,6,32,7,131,66,0,82,13,2,26,32,6,66,1,136,33,6,32,3,65,1,106,33,3,12,1,11,11,65,127,11,172,33,8,65,0,33,3,3,64,32,3,65,128,2,72,4,64,35,5,33,4,32,3,172,32,8,134,34,9,33,6,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,5,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,5,32,6,131,66,0,82,13,2,26,32,5,66,1,136,33,5,32,1,65,1,106,33,1,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,5,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,5,32,7,131,66,0,82,13,2,26,32,5,66,1,136,33,5,32,1,65,1,106,33,1,12,1,11,11,65,127,11,107,34,2,65,0,78,4,64,32,7,32,2,172,134,32,6,133,33,6,12,1,11,11,32,4,40,2,4,32,3,65,3,116,106,32,6,32,9,132,55,3,0,32,3,65,1,106,33,3,12,1,11,11,65,1,36,4,11,32,0,66,0,55,3,32,32,0,65,0,54,2,0,32,0,66,0,55,3,8,32,0,66,0,55,3,32,32,0,40,2,96,32,0,40,2,0,34,2,16,11,33,1,32,0,40,2,96,32,2,65,1,16,12,32,0,32,0,41,3,32,35,6,40,2,4,32,1,65,3,116,106,41,3,0,133,55,3,32,32,0,32,2,65,1,106,65,192,0,111,54,2,0,32,0,35,5,40,2,4,32,0,41,3,32,34,7,66,45,136,167,65,255,1,113,65,3,116,106,41,3,0,32,7,66,8,134,66,1,132,133,55,3,32,32,0,11,170,1,0,32,0,69,4,64,65,228,0,65,6,16,2,33,0,11,32,0,65,0,54,2,0,32,0,66,0,55,3,8,32,0,66,0,55,3,16,32,0,66,0,55,3,24,32,0,66,0,55,3,32,32,0,66,0,55,3,40,32,0,66,0,55,3,48,32,0,66,0,55,3,56,32,0,66,0,55,3,64,32,0,66,0,55,3,72,32,0,66,0,55,3,80,32,0,66,0,55,3,88,32,0,65,12,65,4,16,2,65,192,0,65,0,16,7,54,2,96,32,0,32,2,173,55,3,72,32,0,32,3,173,55,3,80,32,0,66,1,32,1,173,134,66,1,125,55,3,88,32,0,66,243,130,183,218,216,230,232,30,55,3,64,32,0,16,13,26,32,0,11,129,4,2,6,127,6,126,32,1,40,2,8,33,5,32,1,40,2,4,33,6,3,64,2,127,32,0,41,3,16,33,10,32,0,41,3,8,33,9,32,0,41,3,88,33,11,32,0,41,3,72,33,12,32,0,41,3,80,33,13,65,0,33,1,3,64,32,1,32,5,72,4,64,32,1,32,6,106,45,0,0,33,3,32,0,40,2,96,32,0,40,2,0,34,4,16,11,33,7,32,0,40,2,96,32,4,32,3,16,12,32,0,32,0,41,3,32,35,6,40,2,4,32,7,65,3,116,106,41,3,0,133,55,3,32,32,0,32,4,65,1,106,65,192,0,111,54,2,0,32,0,35,5,40,2,4,32,0,41,3,32,34,14,66,45,136,167,65,255,1,113,65,3,116,106,41,3,0,32,3,173,32,14,66,8,134,132,133,55,3,32,32,10,66,1,124,33,10,32,9,66,1,124,34,9,32,12,90,4,127,32,0,41,3,32,32,11,131,80,5,65,0,11,4,127,65,1,5,32,9,32,13,90,11,4,64,32,0,32,0,41,3,24,55,3,40,32,0,32,9,55,3,48,32,0,32,0,41,3,32,55,3,56,32,0,32,10,55,3,16,32,0,32,9,55,3,8,32,0,66,0,55,3,32,32,0,65,0,54,2,0,32,0,66,0,55,3,8,32,0,66,0,55,3,32,32,0,40,2,96,32,0,40,2,0,34,3,16,11,33,4,32,0,40,2,96,32,3,65,1,16,12,32,0,32,0,41,3,32,35,6,40,2,4,32,4,65,3,116,106,41,3,0,133,55,3,32,32,0,32,3,65,1,106,65,192,0,111,54,2,0,32,0,35,5,40,2,4,32,0,41,3,32,34,9,66,45,136,167,65,255,1,113,65,3,116,106,41,3,0,32,9,66,8,134,66,1,132,133,55,3,32,32,0,40,2,96,40,2,4,65,192,0,16,6,32,1,65,1,106,12,3,5,32,1,65,1,106,33,1,12,2,11,0,11,11,32,0,32,10,55,3,16,32,0,32,9,55,3,8,65,127,11,34,1,65,0,78,4,64,32,5,32,1,107,33,5,32,1,32,6,106,33,6,32,2,40,2,4,32,8,65,1,106,34,8,65,2,116,106,32,0,41,3,48,62,2,0,12,1,11,11,32,2,11,20,0,65,160,2,36,0,65,160,2,36,1,16,8,36,5,16,8,36,6,11,7,0,32,0,40,2,0,11,9,0,32,0,32,1,54,2,0,11,7,0,32,0,41,3,8,11,9,0,32,0,32,1,55,3,8,11,7,0,32,0,41,3,16,11,9,0,32,0,32,1,55,3,16,11,7,0,32,0,41,3,24,11,9,0,32,0,32,1,55,3,24,11,7,0,32,0,41,3,32,11,9,0,32,0,32,1,55,3,32,11,7,0,32,0,41,3,40,11,9,0,32,0,32,1,55,3,40,11,7,0,32,0,41,3,48,11,9,0,32,0,32,1,55,3,48,11,7,0,32,0,41,3,56,11,9,0,32,0,32,1,55,3,56,11,7,0,32,0,41,3,64,11,9,0,32,0,32,1,55,3,64,11,7,0,32,0,41,3,72,11,9,0,32,0,32,1,55,3,72,11,7,0,32,0,41,3,80,11,9,0,32,0,32,1,55,3,80,11,7,0,32,0,41,3,88,11,9,0,32,0,32,1,55,3,88,11,7,0,32,0,40,2,96,11,15,0,32,1,40,2,96,26,32,0,32,1,54,2,96,11,11,152,2,5,0,65,8,11,43,28,0,0,0,1,0,0,0,1,0,0,0,28,0,0,0,73,0,110,0,118,0,97,0,108,0,105,0,100,0,32,0,108,0,101,0,110,0,103,0,116,0,104,0,65,56,11,53,38,0,0,0,1,0,0,0,1,0,0,0,38,0,0,0,126,0,108,0,105,0,98,0,47,0,97,0,114,0,114,0,97,0,121,0,98,0,117,0,102,0,102,0,101,0,114,0,46,0,116,0,115,0,65,240,0,11,51,36,0,0,0,1,0,0,0,1,0,0,0,36,0,0,0,73,0,110,0,100,0,101,0,120,0,32,0,111,0,117,0,116,0,32,0,111,0,102,0,32,0,114,0,97,0,110,0,103,0,101,0,65,168,1,11,51,36,0,0,0,1,0,0,0,1,0,0,0,36,0,0,0,126,0,108,0,105,0,98,0,47,0,116,0,121,0,112,0,101,0,100,0,97,0,114,0,114,0,97,0,121,0,46,0,116,0,115,0,65,224,1,11,53,7,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,145,4,0,0,2,0,0,0,49,0,0,0,2,0,0,0,17,1,0,0,2,0,0,0,16,0,32,16,115,111,117,114,99,101,77,97,112,112,105,110,103,85,82,76,14,114,97,98,105,110,46,119,97,115,109,46,109,97,112])
var wasm = new Uint8Array([0,97,115,109,1,0,0,0,1,90,16,96,2,127,126,0,96,1,127,1,126,96,2,127,127,0,96,1,127,1,127,96,0,0,96,1,127,0,96,2,127,127,1,127,96,3,127,127,127,1,127,96,3,127,127,127,0,96,4,127,127,127,127,0,96,3,127,127,126,0,96,0,1,127,96,5,127,127,127,127,127,1,127,96,1,126,1,127,96,2,127,127,1,126,96,2,126,126,1,126,2,13,1,3,101,110,118,5,97,98,111,114,116,0,9,3,54,53,5,6,3,5,4,4,2,7,11,13,15,10,8,6,14,5,12,3,2,3,2,3,2,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,7,4,5,3,1,0,1,6,47,9,127,1,65,0,11,127,1,65,0,11,127,0,65,3,11,127,0,65,4,11,127,1,65,0,11,127,1,65,0,11,127,1,65,0,11,127,0,65,128,2,11,127,0,65,6,11,7,162,7,48,6,109,101,109,111,114,121,2,0,7,95,95,97,108,108,111,99,0,2,8,95,95,114,101,116,97,105,110,0,3,9,95,95,114,101,108,101,97,115,101,0,4,9,95,95,99,111,108,108,101,99,116,0,5,7,95,95,114,101,115,101,116,0,6,11,95,95,114,116,116,105,95,98,97,115,101,3,7,13,73,110,116,51,50,65,114,114,97,121,95,73,68,3,2,13,85,105,110,116,56,65,114,114,97,121,95,73,68,3,3,6,100,101,103,114,101,101,0,10,3,109,111,100,0,11,5,82,97,98,105,110,3,8,16,82,97,98,105,110,35,103,101,116,58,119,105,110,100,111,119,0,18,16,82,97,98,105,110,35,115,101,116,58,119,105,110,100,111,119,0,19,21,82,97,98,105,110,35,103,101,116,58,119,105,110,100,111,119,95,115,105,122,101,0,20,21,82,97,98,105,110,35,115,101,116,58,119,105,110,100,111,119,95,115,105,122,101,0,21,14,82,97,98,105,110,35,103,101,116,58,119,112,111,115,0,22,14,82,97,98,105,110,35,115,101,116,58,119,112,111,115,0,23,15,82,97,98,105,110,35,103,101,116,58,99,111,117,110,116,0,24,15,82,97,98,105,110,35,115,101,116,58,99,111,117,110,116,0,25,13,82,97,98,105,110,35,103,101,116,58,112,111,115,0,26,13,82,97,98,105,110,35,115,101,116,58,112,111,115,0,27,15,82,97,98,105,110,35,103,101,116,58,115,116,97,114,116,0,28,15,82,97,98,105,110,35,115,101,116,58,115,116,97,114,116,0,29,16,82,97,98,105,110,35,103,101,116,58,100,105,103,101,115,116,0,30,16,82,97,98,105,110,35,115,101,116,58,100,105,103,101,115,116,0,31,21,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,115,116,97,114,116,0,32,21,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,115,116,97,114,116,0,33,22,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,108,101,110,103,116,104,0,34,22,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,108,101,110,103,116,104,0,35,31,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,99,117,116,95,102,105,110,103,101,114,112,114,105,110,116,0,36,31,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,99,117,116,95,102,105,110,103,101,114,112,114,105,110,116,0,37,20,82,97,98,105,110,35,103,101,116,58,112,111,108,121,110,111,109,105,97,108,0,38,20,82,97,98,105,110,35,115,101,116,58,112,111,108,121,110,111,109,105,97,108,0,39,27,82,97,98,105,110,35,103,101,116,58,112,111,108,121,110,111,109,105,97,108,95,100,101,103,114,101,101,0,40,27,82,97,98,105,110,35,115,101,116,58,112,111,108,121,110,111,109,105,97,108,95,100,101,103,114,101,101,0,41,26,82,97,98,105,110,35,103,101,116,58,112,111,108,121,110,111,109,105,97,108,95,115,104,105,102,116,0,42,26,82,97,98,105,110,35,115,101,116,58,112,111,108,121,110,111,109,105,97,108,95,115,104,105,102,116,0,43,22,82,97,98,105,110,35,103,101,116,58,97,118,101,114,97,103,101,95,98,105,116,115,0,44,22,82,97,98,105,110,35,115,101,116,58,97,118,101,114,97,103,101,95,98,105,116,115,0,45,17,82,97,98,105,110,35,103,101,116,58,109,105,110,115,105,122,101,0,46,17,82,97,98,105,110,35,115,101,116,58,109,105,110,115,105,122,101,0,47,17,82,97,98,105,110,35,103,101,116,58,109,97,120,115,105,122,101,0,48,17,82,97,98,105,110,35,115,101,116,58,109,97,120,115,105,122,101,0,49,14,82,97,98,105,110,35,103,101,116,58,109,97,115,107,0,50,14,82,97,98,105,110,35,115,101,116,58,109,97,115,107,0,51,17,82,97,98,105,110,35,99,111,110,115,116,114,117,99,116,111,114,0,17,17,82,97,98,105,110,35,102,105,110,103,101,114,112,114,105,110,116,0,52,8,1,53,10,129,25,53,70,1,2,127,32,0,63,0,34,2,65,16,116,34,1,75,4,64,32,2,32,0,32,1,107,65,255,255,3,106,65,128,128,124,113,65,16,118,34,1,32,2,32,1,74,27,64,0,65,0,72,4,64,32,1,64,0,65,0,72,4,64,0,11,11,11,32,0,36,1,11,82,1,3,127,32,0,65,240,255,255,255,3,75,4,64,0,11,35,1,65,16,106,34,3,32,0,65,15,106,65,112,113,34,2,65,16,32,2,65,16,75,27,34,4,106,16,1,32,3,65,16,107,34,2,32,4,54,2,0,32,2,65,1,54,2,4,32,2,32,1,54,2,8,32,2,32,0,54,2,12,32,3,11,4,0,32,0,11,3,0,1,11,3,0,1,11,6,0,35,0,36,1,11,37,1,1,127,3,64,32,1,4,64,32,0,34,2,65,1,106,33,0,32,2,65,0,58,0,0,32,1,65,1,107,33,1,12,1,11,11,11,110,0,32,1,65,240,255,255,255,3,32,2,118,75,4,64,65,32,65,208,0,65,23,65,56,16,0,0,11,32,1,32,2,116,34,2,65,0,16,2,34,1,32,2,16,7,32,0,69,4,64,65,12,65,2,16,2,33,0,11,32,0,65,0,54,2,0,32,0,65,0,54,2,4,32,0,65,0,54,2,8,32,0,40,2,0,26,32,0,32,1,54,2,0,32,0,32,1,54,2,4,32,0,32,2,54,2,8,32,0,11,15,0,65,12,65,5,16,2,65,128,2,65,3,16,8,11,66,2,1,127,1,126,66,128,128,128,128,128,128,128,128,128,127,33,2,3,64,32,1,65,192,0,72,4,64,32,0,32,2,131,66,0,86,4,64,65,63,32,1,107,15,11,32,2,66,1,136,33,2,32,1,65,1,106,33,1,12,1,11,11,65,127,11,167,2,2,1,127,2,126,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,3,65,0,33,2,3,64,32,2,65,192,0,72,4,64,65,63,32,2,107,32,0,32,3,131,66,0,86,13,2,26,32,3,66,1,136,33,3,32,2,65,1,106,33,2,12,1,11,11,65,127,11,2,127,32,1,33,4,66,128,128,128,128,128,128,128,128,128,127,33,3,65,0,33,2,3,64,32,2,65,192,0,72,4,64,65,63,32,2,107,32,3,32,4,131,66,0,86,13,2,26,32,3,66,1,136,33,3,32,2,65,1,106,33,2,12,1,11,11,65,127,11,78,4,64,32,0,32,1,2,127,66,128,128,128,128,128,128,128,128,128,127,33,3,65,0,33,2,3,64,32,2,65,192,0,72,4,64,65,63,32,2,107,32,0,32,3,131,66,0,86,13,2,26,32,3,66,1,136,33,3,32,2,65,1,106,33,2,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,3,65,0,33,2,3,64,32,2,65,192,0,72,4,64,65,63,32,2,107,32,1,32,3,131,66,0,86,13,2,26,32,3,66,1,136,33,3,32,2,65,1,106,33,2,12,1,11,11,65,127,11,107,172,134,133,33,0,12,1,11,11,32,0,11,18,0,32,0,40,2,4,32,1,65,3,116,106,32,2,55,3,0,11,40,0,32,1,32,0,40,2,8,79,4,64,65,144,1,65,208,1,65,163,1,65,44,16,0,0,11,32,1,32,0,40,2,4,106,32,2,58,0,0,11,38,0,32,1,32,0,40,2,8,79,4,64,65,144,1,65,208,1,65,152,1,65,44,16,0,0,11,32,1,32,0,40,2,4,106,45,0,0,11,16,0,32,0,40,2,4,32,1,65,3,116,106,41,3,0,11,131,10,2,3,127,6,126,32,0,33,2,35,4,69,4,64,3,64,32,3,65,128,2,72,4,64,32,3,65,255,1,113,173,33,5,32,2,41,3,72,33,6,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,4,32,5,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,1,65,1,106,33,1,12,1,11,11,65,127,11,2,127,32,6,33,7,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,4,32,7,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,1,65,1,106,33,1,12,1,11,11,65,127,11,78,4,64,32,5,32,6,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,0,3,64,32,0,65,192,0,72,4,64,65,63,32,0,107,32,4,32,5,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,0,65,1,106,33,0,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,0,3,64,32,0,65,192,0,72,4,64,65,63,32,0,107,32,4,32,6,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,0,65,1,106,33,0,12,1,11,11,65,127,11,107,172,134,133,33,5,12,1,11,11,65,0,33,1,3,64,32,1,32,2,40,2,4,65,1,107,72,4,64,32,5,66,8,134,33,5,32,2,41,3,72,33,6,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,0,3,64,32,0,65,192,0,72,4,64,65,63,32,0,107,32,4,32,5,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,0,65,1,106,33,0,12,1,11,11,65,127,11,2,127,32,6,33,7,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,0,3,64,32,0,65,192,0,72,4,64,65,63,32,0,107,32,4,32,7,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,0,65,1,106,33,0,12,1,11,11,65,127,11,78,4,64,32,5,32,6,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,0,3,64,32,0,65,192,0,72,4,64,65,63,32,0,107,32,4,32,5,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,0,65,1,106,33,0,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,0,3,64,32,0,65,192,0,72,4,64,65,63,32,0,107,32,4,32,6,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,0,65,1,106,33,0,12,1,11,11,65,127,11,107,172,134,133,33,5,12,1,11,11,32,1,65,1,106,33,1,12,1,11,11,35,6,32,3,32,5,16,12,32,3,65,1,106,33,3,12,1,11,11,2,127,32,2,41,3,72,33,7,66,128,128,128,128,128,128,128,128,128,127,33,5,65,0,33,3,3,64,32,3,65,192,0,72,4,64,65,63,32,3,107,32,5,32,7,131,66,0,86,13,2,26,32,5,66,1,136,33,5,32,3,65,1,106,33,3,12,1,11,11,65,127,11,172,33,8,65,0,33,3,3,64,32,3,65,128,2,72,4,64,35,5,33,0,32,3,172,32,8,134,34,9,33,5,32,2,41,3,72,33,6,3,64,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,4,32,5,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,1,65,1,106,33,1,12,1,11,11,65,127,11,2,127,32,6,33,7,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,4,32,7,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,1,65,1,106,33,1,12,1,11,11,65,127,11,78,4,64,32,5,32,6,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,4,32,5,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,1,65,1,106,33,1,12,1,11,11,65,127,11,2,127,66,128,128,128,128,128,128,128,128,128,127,33,4,65,0,33,1,3,64,32,1,65,192,0,72,4,64,65,63,32,1,107,32,4,32,6,131,66,0,86,13,2,26,32,4,66,1,136,33,4,32,1,65,1,106,33,1,12,1,11,11,65,127,11,107,172,134,133,33,5,12,1,11,11,32,0,32,3,32,5,32,9,132,16,12,32,3,65,1,106,33,3,12,1,11,11,65,1,36,4,11,32,2,66,0,55,3,24,32,2,66,0,55,3,32,65,0,33,0,3,64,32,0,32,2,40,2,4,72,4,64,32,2,40,2,0,32,0,65,0,16,13,32,0,65,1,106,33,0,12,1,11,11,32,2,66,0,55,3,40,32,2,65,0,54,2,8,32,2,66,0,55,3,16,32,2,66,0,55,3,40,32,2,40,2,0,32,2,40,2,8,16,14,33,0,32,2,40,2,0,32,2,40,2,8,65,1,16,13,32,2,32,2,41,3,40,35,6,32,0,16,15,133,55,3,40,32,2,32,2,40,2,8,65,1,106,32,2,40,2,4,111,54,2,8,32,2,35,5,32,2,41,3,40,34,7,32,2,41,3,88,136,167,65,255,1,113,16,15,32,7,66,8,134,66,1,132,133,55,3,40,11,250,1,0,32,0,69,4,64,65,128,1,65,6,16,2,33,0,11,32,0,65,0,54,2,0,32,0,65,0,54,2,4,32,0,65,0,54,2,8,32,0,66,0,55,3,16,32,0,66,0,55,3,24,32,0,66,0,55,3,32,32,0,66,0,55,3,40,32,0,66,0,55,3,48,32,0,66,0,55,3,56,32,0,66,0,55,3,64,32,0,66,0,55,3,72,32,0,66,0,55,3,80,32,0,66,0,55,3,88,32,0,66,0,55,3,96,32,0,66,0,55,3,104,32,0,66,0,55,3,112,32,0,66,0,55,3,120,32,0,32,1,173,55,3,96,32,0,32,2,173,55,3,104,32,0,32,3,173,55,3,112,65,12,65,4,16,2,32,4,65,0,16,8,33,1,32,0,40,2,0,26,32,0,32,1,54,2,0,32,0,32,4,54,2,4,32,0,66,1,32,0,41,3,96,134,66,1,125,55,3,120,32,0,66,243,130,183,218,216,230,232,30,55,3,72,32,0,66,53,55,3,80,32,0,32,0,41,3,80,66,8,125,55,3,88,32,0,16,16,32,0,11,7,0,32,0,40,2,0,11,15,0,32,0,40,2,0,26,32,0,32,1,54,2,0,11,7,0,32,0,40,2,4,11,9,0,32,0,32,1,54,2,4,11,7,0,32,0,40,2,8,11,9,0,32,0,32,1,54,2,8,11,7,0,32,0,41,3,16,11,9,0,32,0,32,1,55,3,16,11,7,0,32,0,41,3,24,11,9,0,32,0,32,1,55,3,24,11,7,0,32,0,41,3,32,11,9,0,32,0,32,1,55,3,32,11,7,0,32,0,41,3,40,11,9,0,32,0,32,1,55,3,40,11,7,0,32,0,41,3,48,11,9,0,32,0,32,1,55,3,48,11,7,0,32,0,41,3,56,11,9,0,32,0,32,1,55,3,56,11,7,0,32,0,41,3,64,11,9,0,32,0,32,1,55,3,64,11,7,0,32,0,41,3,72,11,9,0,32,0,32,1,55,3,72,11,7,0,32,0,41,3,80,11,9,0,32,0,32,1,55,3,80,11,7,0,32,0,41,3,88,11,9,0,32,0,32,1,55,3,88,11,7,0,32,0,41,3,96,11,9,0,32,0,32,1,55,3,96,11,7,0,32,0,41,3,104,11,9,0,32,0,32,1,55,3,104,11,7,0,32,0,41,3,112,11,9,0,32,0,32,1,55,3,112,11,7,0,32,0,41,3,120,11,9,0,32,0,32,1,55,3,120,11,253,3,2,5,127,1,126,32,2,33,7,32,1,34,2,40,2,8,33,5,65,0,33,1,32,2,40,2,4,33,6,3,64,2,127,65,0,33,4,3,64,32,4,32,5,72,4,64,32,4,32,6,106,45,0,0,33,2,32,0,40,2,0,32,0,40,2,8,16,14,33,3,32,0,40,2,0,32,0,40,2,8,32,2,16,13,32,0,32,0,41,3,40,35,6,32,3,16,15,133,55,3,40,32,0,32,0,40,2,8,65,1,106,32,0,40,2,4,111,54,2,8,32,0,35,5,32,0,41,3,40,34,8,32,0,41,3,88,136,167,65,255,1,113,16,15,32,2,173,32,8,66,8,134,132,133,55,3,40,32,0,32,0,41,3,16,66,1,124,55,3,16,32,0,32,0,41,3,24,66,1,124,55,3,24,32,0,41,3,16,32,0,41,3,104,90,4,127,32,0,41,3,40,32,0,41,3,120,131,80,5,65,0,11,4,127,65,1,5,32,0,41,3,16,32,0,41,3,112,90,11,4,64,32,0,32,0,41,3,32,55,3,48,32,0,32,0,41,3,16,55,3,56,32,0,32,0,41,3,40,55,3,64,32,0,33,2,65,0,33,3,3,64,32,3,32,2,40,2,4,72,4,64,32,2,40,2,0,32,3,65,0,16,13,32,3,65,1,106,33,3,12,1,11,11,32,2,66,0,55,3,40,32,2,65,0,54,2,8,32,2,66,0,55,3,16,32,2,66,0,55,3,40,32,2,40,2,0,32,2,40,2,8,16,14,33,3,32,2,40,2,0,32,2,40,2,8,65,1,16,13,32,2,32,2,41,3,40,35,6,32,3,16,15,133,55,3,40,32,2,32,2,40,2,8,65,1,106,32,2,40,2,4,111,54,2,8,32,2,35,5,32,2,41,3,40,34,8,32,2,41,3,88,136,167,65,255,1,113,16,15,32,8,66,8,134,66,1,132,133,55,3,40,32,4,65,1,106,12,3,11,32,4,65,1,106,33,4,12,1,11,11,65,127,11,34,2,65,0,78,4,64,32,5,32,2,107,33,5,32,2,32,6,106,33,6,32,1,34,2,65,1,106,33,1,32,7,40,2,4,32,2,65,2,116,106,32,0,41,3,56,62,2,0,12,1,11,11,32,7,11,20,0,65,192,2,36,0,65,192,2,36,1,16,9,36,5,16,9,36,6,11,11,153,2,5,0,65,16,11,43,28,0,0,0,1,0,0,0,1,0,0,0,28,0,0,0,73,0,110,0,118,0,97,0,108,0,105,0,100,0,32,0,108,0,101,0,110,0,103,0,116,0,104,0,65,192,0,11,53,38,0,0,0,1,0,0,0,1,0,0,0,38,0,0,0,126,0,108,0,105,0,98,0,47,0,97,0,114,0,114,0,97,0,121,0,98,0,117,0,102,0,102,0,101,0,114,0,46,0,116,0,115,0,65,128,1,11,51,36,0,0,0,1,0,0,0,1,0,0,0,36,0,0,0,73,0,110,0,100,0,101,0,120,0,32,0,111,0,117,0,116,0,32,0,111,0,102,0,32,0,114,0,97,0,110,0,103,0,101,0,65,192,1,11,51,36,0,0,0,1,0,0,0,1,0,0,0,36,0,0,0,126,0,108,0,105,0,98,0,47,0,116,0,121,0,112,0,101,0,100,0,97,0,114,0,114,0,97,0,121,0,46,0,116,0,115,0,65,128,2,11,53,7,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,145,4,0,0,2,0,0,0,49,0,0,0,2,0,0,0,17,1,0,0,2,0,0,0,16,0,34,16,115,111,117,114,99,101,77,97,112,112,105,110,103,85,82,76,16,46,47,114,97,98,105,110,46,119,97,115,109,46,109,97,112])
// make it work async because browsers throw when a wasm module is bigger than 4kb and load sync
return instantiateStreaming(new Response(new Blob([wasm], {type: 'application/wasm'})), imp)
return instantiate(new Response(new Blob([wasm], {type: 'application/wasm'})), imp)
}
module.exports = loadWebAssembly
},{"@assemblyscript/loader":2}],2:[function(require,module,exports){
},{"assemblyscript/lib/loader":2}],2:[function(require,module,exports){
"use strict";

@@ -200,3 +200,3 @@

/** Gets a view on the values of an array in the module's memory. */
/** Gets a live view on an array's values in the module's memory. Infers the array type from RTTI. */
function __getArrayView(arr) {

@@ -218,3 +218,3 @@ const U32 = new Uint32Array(memory.buffer);

/** Reads (copies) the values of an array from the module's memory. */
/** Copies an array's values from the module's memory. Infers the array type from RTTI. */
function __getArray(arr) {

@@ -230,3 +230,3 @@ const input = __getArrayView(arr);

/** Reads (copies) the data of an ArrayBuffer from the module's memory. */
/** Copies an ArrayBuffer's value from the module's memory. */
function __getArrayBuffer(ptr) {

@@ -240,3 +240,9 @@ const buffer = memory.buffer;

function getTypedArrayImpl(Type, alignLog2, ptr) {
/** Copies a typed array's values from the module's memory. */
function getTypedArray(Type, alignLog2, ptr) {
return new Type(getTypedArrayView(Type, alignLog2, ptr));
}
/** Gets a live view on a typed array's values in the module's memory. */
function getTypedArrayView(Type, alignLog2, ptr) {
const buffer = memory.buffer;

@@ -248,26 +254,26 @@ const U32 = new Uint32Array(buffer);

/** Gets a view on the values of a known-to-be Int8Array in the module's memory. */
baseModule.__getInt8Array = getTypedArrayImpl.bind(null, Int8Array, 0);
/** Gets a view on the values of a known-to-be Uint8Array in the module's memory. */
baseModule.__getUint8Array = getTypedArrayImpl.bind(null, Uint8Array, 0);
/** Gets a view on the values of a known-to-be Uint8ClampedArray in the module's memory. */
baseModule.__getUint8ClampedArray = getTypedArrayImpl.bind(null, Uint8ClampedArray, 0);
/** Gets a view on the values of a known-to-be Int16Array in the module's memory. */
baseModule.__getInt16Array = getTypedArrayImpl.bind(null, Int16Array, 1);
/** Gets a view on the values of a known-to-be Uint16Array in the module's memory. */
baseModule.__getUint16Array = getTypedArrayImpl.bind(null, Uint16Array, 1);
/** Gets a view on the values of a known-to-be Int32Array in the module's memory. */
baseModule.__getInt32Array = getTypedArrayImpl.bind(null, Int32Array, 2);
/** Gets a view on the values of a known-to-be Uint32Array in the module's memory. */
baseModule.__getUint32Array = getTypedArrayImpl.bind(null, Uint32Array, 2);
baseModule.__getInt8Array = getTypedArray.bind(null, Int8Array, 0);
baseModule.__getInt8ArrayView = getTypedArrayView.bind(null, Int8Array, 0);
baseModule.__getUint8Array = getTypedArray.bind(null, Uint8Array, 0);
baseModule.__getUint8ArrayView = getTypedArrayView.bind(null, Uint8Array, 0);
baseModule.__getUint8ClampedArray = getTypedArray.bind(null, Uint8ClampedArray, 0);
baseModule.__getUint8ClampedArrayView = getTypedArrayView.bind(null, Uint8ClampedArray, 0);
baseModule.__getInt16Array = getTypedArray.bind(null, Int16Array, 1);
baseModule.__getInt16ArrayView = getTypedArrayView.bind(null, Int16Array, 1);
baseModule.__getUint16Array = getTypedArray.bind(null, Uint16Array, 1);
baseModule.__getUint16ArrayView = getTypedArrayView.bind(null, Uint16Array, 1);
baseModule.__getInt32Array = getTypedArray.bind(null, Int32Array, 2);
baseModule.__getInt32ArrayView = getTypedArrayView.bind(null, Int32Array, 2);
baseModule.__getUint32Array = getTypedArray.bind(null, Uint32Array, 2);
baseModule.__getUint32ArrayView = getTypedArrayView.bind(null, Uint32Array, 2);
if (BIGINT) {
/** Gets a view on the values of a known-to-be-Int64Array in the module's memory. */
baseModule.__getInt64Array = getTypedArrayImpl.bind(null, BigInt64Array, 3);
/** Gets a view on the values of a known-to-be-Uint64Array in the module's memory. */
baseModule.__getUint64Array = getTypedArrayImpl.bind(null, BigUint64Array, 3);
baseModule.__getInt64Array = getTypedArray.bind(null, BigInt64Array, 3);
baseModule.__getInt64ArrayView = getTypedArrayView.bind(null, BigInt64Array, 3);
baseModule.__getUint64Array = getTypedArray.bind(null, BigUint64Array, 3);
baseModule.__getUint64ArrayView = getTypedArrayView.bind(null, BigUint64Array, 3);
}
/** Gets a view on the values of a known-to-be Float32Array in the module's memory. */
baseModule.__getFloat32Array = getTypedArrayImpl.bind(null, Float32Array, 2);
/** Gets a view on the values of a known-to-be Float64Array in the module's memory. */
baseModule.__getFloat64Array = getTypedArrayImpl.bind(null, Float64Array, 3);
baseModule.__getFloat32Array = getTypedArray.bind(null, Float32Array, 2);
baseModule.__getFloat32ArrayView = getTypedArrayView.bind(null, Float32Array, 2);
baseModule.__getFloat64Array = getTypedArray.bind(null, Float64Array, 3);
baseModule.__getFloat64ArrayView = getTypedArrayView.bind(null, Float64Array, 3);

@@ -295,12 +301,2 @@ /** Tests whether an object is an instance of the class represented by the specified base id. */

/** Wraps a WebAssembly function while also taking care of variable arguments. */
function wrapFunction(fn, setargc) {
var wrap = (...args) => {
setargc(args.length);
return fn(...args);
}
wrap.original = fn;
return wrap;
}
function isResponse(o) {

@@ -362,9 +358,8 @@ return typeof Response !== "undefined" && o instanceof Response;

var module = baseModule ? Object.create(baseModule) : {};
var setargc = exports["__setargc"] || function() {};
function hasOwnProperty(elem, prop) {
return Object.prototype.hasOwnProperty.call(elem, prop);
}
var setArgumentsLength = exports["__argumentsLength"]
? function(length) { exports["__argumentsLength"].value = length; }
: exports["__setArgumentsLength"] || exports["__setargc"] || function() {};
for (let internalName in exports) {
if (!hasOwnProperty(exports, internalName)) continue;
let elem = exports[internalName];
if (!Object.prototype.hasOwnProperty.call(exports, internalName)) continue;
const elem = exports[internalName];
let parts = internalName.split(".");

@@ -374,3 +369,3 @@ let curr = module;

let part = parts.shift();
if (!hasOwnProperty(curr, part)) curr[part] = {};
if (!Object.prototype.hasOwnProperty.call(curr, part)) curr[part] = {};
curr = curr[part];

@@ -403,3 +398,3 @@ }

if (/^(get|set):/.test(name)) {
if (!hasOwnProperty(curr, name = name.substring(4))) {
if (!Object.prototype.hasOwnProperty.call(curr, name = name.substring(4))) {
let getter = exports[internalName.replace("set:", "get:")];

@@ -415,10 +410,11 @@ let setter = exports[internalName.replace("get:", "set:")];

if (name === 'constructor') {
curr[name] = wrapFunction(elem, setargc);
} else { // for methods
Object.defineProperty(curr, name, {
value: function (...args) {
setargc(args.length);
return elem(this[THIS], ...args);
}
});
(curr[name] = (...args) => {
setArgumentsLength(args.length);
return elem(...args);
}).original = elem;
} else { // instance method
(curr[name] = function(...args) { // !
setArgumentsLength(args.length);
return elem(this[THIS], ...args);
}).original = elem;
}

@@ -428,3 +424,3 @@ }

if (/^(get|set):/.test(name)) {
if (!hasOwnProperty(curr, name = name.substring(4))) {
if (!Object.prototype.hasOwnProperty.call(curr, name = name.substring(4))) {
Object.defineProperty(curr, name, {

@@ -436,4 +432,7 @@ get: exports[internalName.replace("set:", "get:")],

}
} else if (typeof elem === "function") {
curr[name] = wrapFunction(elem, setargc);
} else if (typeof elem === "function" && elem !== setArgumentsLength) {
(curr[name] = (...args) => {
setArgumentsLength(args.length);
return elem(...args);
}).original = elem;
} else {

@@ -444,3 +443,2 @@ curr[name] = elem;

}
return module;

@@ -455,10 +453,11 @@ }

const create = async (bits, min, max) => {
const compiled = await getRabin()
return new Rabin(compiled, bits, min, max)
const create = async (bits, min, max, windowSize) => {
const compiled = await getRabin()
return new Rabin(bits, min, max, windowSize, compiled)
}
module.exports = {
Rabin,
create,
Rabin,
create
}

@@ -481,3 +480,3 @@

*/
constructor(asModule, bits = 12, min = 8 * 1024, max = 32 * 1024) {
constructor(bits = 12, min = 8 * 1024, max = 32 * 1024, windowSize = 64, asModule) {
this.bits = bits

@@ -487,3 +486,3 @@ this.min = min

this.asModule = asModule
this.rabin = new asModule.Rabin(bits, min, max)
this.rabin = new asModule.Rabin(bits, min, max, windowSize)
}

@@ -498,13 +497,33 @@

*/
fingerprint(buffer) {
const { __retain, __allocArray, __getInt32Array, Int32Array_ID, Uint8Array_ID } = this.asModule
fingerprint(buf) {
const {
__retain,
__release,
__allocArray,
__getInt32Array,
Int32Array_ID,
Uint8Array_ID
} = this.asModule
const lengths = new Int32Array(Math.ceil(buffer.length / this.min))
const lengths = new Int32Array(Math.ceil(buf.length/this.min))
const lengthsPtr = __retain(__allocArray(Int32Array_ID, lengths))
const pointer = __retain(__allocArray(Uint8Array_ID, buffer))
const pointer = __retain(__allocArray(Uint8Array_ID, buf))
// run fingerprint
const processed = __getInt32Array(this.rabin.fingerprint(pointer, lengthsPtr))
// run finderprint
const out = this.rabin.fingerprint(pointer, lengthsPtr)
const processed = __getInt32Array(out)
return processed;
//free memory
__release(lengthsPtr)
__release(pointer)
// TODO: remove this. @see https://github.com/ipfs/js-ipfs/issues/2118#issuecomment-497722625
// clean extra 0s in the array
const cleanArr = []
for (let i = 0; i < processed.length; i++) {
if(processed[i] === 0) break
cleanArr[i] = processed[i];
}
return cleanArr
}

@@ -514,4 +533,3 @@ }

module.exports = Rabin
},{}]},{},[3])(3)
});
{
"name": "rabin-wasm",
"version": "0.1.0",
"version": "0.1.1",
"description": "Rabin fingerprinting implemented in AssemblyScript",

@@ -22,7 +22,6 @@ "homepage": "https://github.com/hugomrdias/rabin-wasm",

"scripts": {
"asbuild:untouched": "asc assembly/index.ts -b build/untouched.wasm -t build/untouched.wat --runtime stub --sourceMap --validate --debug",
"asbuild:optimized": "asc assembly/index.ts -b build/optimized.wasm -t build/optimized.wat --runtime stub --sourceMap --validate -O3",
"asbuild:untouched": "asc assembly/index.ts -b build/untouched.wasm -t build/untouched.wat --sourceMap --validate --debug",
"asbuild:optimized": "asc assembly/index.ts -b build/optimized.wasm -t build/optimized.wat --sourceMap --validate --optimize",
"asbuild": "npm run asbuild:untouched && npm run asbuild:optimized",
"build": "asc assembly/index.ts -b dist/rabin.wasm -d dist/rabin.d.ts --sourceMap --validate --runtime stub -O3 && ./tools/wasm2js dist/rabin.wasm -o dist/rabin-wasm.js && browserify src/index.js -s Rabin -o dist/rabin.umd.js",
"test": "asp --nortrace",
"build": "asc assembly/index.ts -b dist/rabin.wasm -d dist/rabin.d.ts --runtime stub --sourceMap --validate -O3z && ./tools/wasm2js dist/rabin.wasm -o dist/rabin-wasm.js && browserify src/index.js -s Rabin -o dist/rabin.umd.js",
"size": "size-limit dist/rabin.umd.js",

@@ -36,8 +35,8 @@ "prepublishOnly": "npm run build"

"dependencies": {
"@assemblyscript/loader": "^0.8.1-nightly.20200101",
"bl": "^4.0.0",
"@assemblyscript/loader": "^0.9.2",
"bl": "^4.0.1",
"debug": "^4.1.1",
"minimist": "^1.2.0",
"node-fetch": "^2.6.0",
"readable-stream": "^3.4.0"
"readable-stream": "^3.6.0"
},

@@ -47,3 +46,3 @@ "devDependencies": {

"@size-limit/preset-small-lib": "^4.2.1",
"assemblyscript": "^0.8.1-nightly.20200101",
"assemblyscript": "^0.9.2",
"benchmark": "^2.1.4",

@@ -50,0 +49,0 @@ "browserify": "^16.3.0",

const Rabin = require('./rabin')
const getRabin = require('../dist/rabin-wasm.node.js')
const create = async (bits, min, max) => {
const compiled = await getRabin()
return new Rabin(compiled, bits, min, max)
const create = async (bits, min, max, windowSize) => {
const compiled = await getRabin()
return new Rabin(bits, min, max, windowSize, compiled)
}
module.exports = {
Rabin,
create,
Rabin,
create
}

@@ -15,3 +15,3 @@ /**

*/
constructor(asModule, bits = 12, min = 8 * 1024, max = 32 * 1024) {
constructor(bits = 12, min = 8 * 1024, max = 32 * 1024, windowSize = 64, asModule) {
this.bits = bits

@@ -21,3 +21,3 @@ this.min = min

this.asModule = asModule
this.rabin = new asModule.Rabin(bits, min, max)
this.rabin = new asModule.Rabin(bits, min, max, windowSize)
}

@@ -32,16 +32,36 @@

*/
fingerprint(buffer) {
const { __retain, __allocArray, __getInt32Array, Int32Array_ID, Uint8Array_ID } = this.asModule
fingerprint(buf) {
const {
__retain,
__release,
__allocArray,
__getInt32Array,
Int32Array_ID,
Uint8Array_ID
} = this.asModule
const lengths = new Int32Array(Math.ceil(buffer.length / this.min))
const lengths = new Int32Array(Math.ceil(buf.length/this.min))
const lengthsPtr = __retain(__allocArray(Int32Array_ID, lengths))
const pointer = __retain(__allocArray(Uint8Array_ID, buffer))
const pointer = __retain(__allocArray(Uint8Array_ID, buf))
// run fingerprint
const processed = __getInt32Array(this.rabin.fingerprint(pointer, lengthsPtr))
// run finderprint
const out = this.rabin.fingerprint(pointer, lengthsPtr)
const processed = __getInt32Array(out)
return processed;
//free memory
__release(lengthsPtr)
__release(pointer)
// TODO: remove this. @see https://github.com/ipfs/js-ipfs/issues/2118#issuecomment-497722625
// clean extra 0s in the array
const cleanArr = []
for (let i = 0; i < processed.length; i++) {
if(processed[i] === 0) break
cleanArr[i] = processed[i];
}
return cleanArr
}
}
module.exports = Rabin
module.exports = Rabin

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc