pierrec/node-lz4 — pull request #14 by tpodom (2014-05-21 16:49:39+00:00)
Title: Added karma to run tests in Chrome for encoding & decoding

Added karma tests to validate browser functionality.

I'm currently running into two issues with the tests.

My main issue is that decoding the sphere.dae fails with a stream checksum error. I tested the data/test.lz4 and it worked. I'm not sure if that's because it was created without a stream checksum? I'm not really sure where to begin looking as it appears to get through all of the blocks and then fails on the final checksum. I am able to decode the sphere.lz4 file from a node script though so it's definitely something different between node & browser.

The second is issue #13 which prevents any encoding in the browser (short or long text).

The sphere.lz4.dat file (named .dat so karma serves it as binary) was created with the following node script:
```
var fs = require('fs')
var lz4 = require('lz4')
var bomstrip = require('bomstrip');
var encoder = lz4.createEncoderStream()

var input = fs.createReadStream(process.argv[2], {encoding: 'utf8'})
var output = fs.createWriteStream(process.argv[2] + '.lz4')
input.pipe(new bomstrip()).pipe(encoder).pipe(output)
```