lz4-xhr.jsx
Synopsis
lz4 filter for XHR
Motivation
It provides another XHR API with data decompression.
Code Example
var worker = 'lz4-xhr.js';worker { var content = eventcontent; // ArrayBuffer var dataView = content; var decoder = "utf-8"; var json = JSON;};worker;
Installation
$ npm install lz4-xhr.jsx
JavaScript code is in dest/src
folder.
API Reference
lz4-xhr
provides simple API via WebWorker interface.
It receives URL as a postMessage parameter. It returns content
property of resulting event.
content
is an ArrayBuffer object.
Development
JSX
Don't be afraid JSX! If you have an experience of JavaScript, you can learn JSX quickly.
- Static type system and unified class syntax.
- All variables and methods belong to class.
- JSX includes optimizer. You don't have to write tricky unreadalbe code for speed.
- You can use almost all JavaScript API as you know. Some functions become static class functions. See reference.
Repository
- Repository: git://github.com/shibukawa.yoshiki/lz4-xhr.jsx.git
- Issues: https://github.com/shibukawa.yoshiki/lz4-xhr.jsx/issues
Setup build environment
To create development environment, call following command:
$ npm install
Run Test
$ grunt test
Run Sample
# Build web worker and sample client $ grunt build # Launch webserver $ grunt connect
Generate API reference
$ grunt doc
Author
- shibukawa.yoshiki / shibukawa.yoshiki@gmail.com
License
MIT License.
Complete license is written in LICENSE.md
.