tamper icon indicating copy to clipboard operation
tamper copied to clipboard

Node Support

Open chiplay opened this issue 10 years ago • 9 comments

Any plans for supporting Node in the future? This project has got me pretty excited!

chiplay avatar Apr 17 '14 15:04 chiplay

+1.

dashed avatar Apr 17 '14 16:04 dashed

Yeah, I'd like this to have Node support. :)

sebinsua avatar Apr 17 '14 16:04 sebinsua

+1 yes please

rayshan avatar Apr 17 '14 17:04 rayshan

thanks to https://www.npmjs.org/package/buffer it should be possible to use the Buffer API to get better performance in JavaScript, e.g. the current JS decoder uses charCodeAt instead of methods on typed arrays. If I was going to write an encoder in JS i'd do it as a new small node module that uses the Buffer API, then it would work in the browser automatically too.

max-mapper avatar Apr 17 '14 19:04 max-mapper

None of us are node guys but it would definitely be cool to have node support. Anyone have a sense of how difficult it would be to wrap?

esmooov avatar Apr 17 '14 20:04 esmooov

@esmooov should be pretty easy, http://nodejs.org/api/buffer.html should have everything you need

max-mapper avatar Apr 17 '14 20:04 max-mapper

Is anyone actively working on this yet?

designfrontier avatar Apr 17 '14 22:04 designfrontier

Here's what I have so far: https://github.com/oztu/tamp

No tests yet, so no guarantees for functionality. I wrote a little script to compare results of the JS encoder results against the Ruby encoder and they do seem to match (for the sample dataset used).

unsetbit avatar Apr 21 '14 08:04 unsetbit

That is looking pretty solid @oztu

designfrontier avatar Apr 24 '14 01:04 designfrontier