mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-30 18:59:10 +00:00
48 lines
2.7 KiB
Markdown
48 lines
2.7 KiB
Markdown
|
Distributions
|
||
|
=============
|
||
|
|
||
|
ByteBuffer.js uses either ArrayBuffers in the browser or Buffers under node.js.
|
||
|
|
||
|
### Browser: [ArrayBuffer](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)-backed
|
||
|
|
||
|
##### Accessed through Typed Arrays
|
||
|
|
||
|
Using Typed Arrays here is pretty much ideal, but it [requires a somewhat recent browser](http://caniuse.com/#feat=typedarrays).
|
||
|
|
||
|
* **[bytebuffer.js](https://raw.githubusercontent.com/dcodeIO/ByteBuffer.js/master/dist/bytebuffer.js)**
|
||
|
uses an ArrayBuffer as its backing buffer, accessed through an [Uint8Array](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).
|
||
|
|
||
|
* **[bytebuffer.min.js](https://raw.githubusercontent.com/dcodeIO/ByteBuffer.js/master/dist/bytebuffer.min.js)**
|
||
|
has been compiled with Closure Compiler using advanced optimizations.
|
||
|
|
||
|
* **[bytebuffer.min.js.gz](https://raw.githubusercontent.com/dcodeIO/ByteBuffer.js/master/dist/bytebuffer.min.js.gz)**
|
||
|
has also been gzipped using `-9`.
|
||
|
|
||
|
* **[bytebuffer.min.map](https://raw.githubusercontent.com/dcodeIO/ByteBuffer.js/master/dist/bytebuffer.min.map)**
|
||
|
is the source map generated by Closure Compiler.
|
||
|
|
||
|
##### Accessed through a DataView ([polyfill](https://github.com/inexorabletash/polyfill/blob/master/typedarray.js) compatible)
|
||
|
|
||
|
Using DataViews is [generally slower](https://github.com/dcodeIO/ByteBuffer.js/issues/16) but works well with common polyfills for
|
||
|
older browsers (avoids array access operators on Typed Arrays).
|
||
|
|
||
|
* **[bytebuffer-dataview.js](https://raw.githubusercontent.com/dcodeIO/ByteBuffer.js/master/dist/bytebuffer-dataview.js)**
|
||
|
uses an ArrayBuffer as its backing buffer, accessed through a [DataView](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/DataView).
|
||
|
|
||
|
* **[bytebuffer-dataview.min.js](https://raw.githubusercontent.com/dcodeIO/ByteBuffer.js/master/dist/bytebuffer-dataview.min.js)**
|
||
|
has been compiled with Closure Compiler using advanced optimizations.
|
||
|
|
||
|
* **[bytebuffer-dataview.min.js.gz](https://raw.githubusercontent.com/dcodeIO/ByteBuffer.js/master/dist/bytebuffer-dataview.min.js.gz)**
|
||
|
has also been gzipped using `-9`.
|
||
|
|
||
|
* **[bytebuffer-dataview.min.map](https://raw.githubusercontent.com/dcodeIO/ByteBuffer.js/master/dist/bytebuffer-dataview.min.map)**
|
||
|
is the source map generated by Closure Compiler.
|
||
|
|
||
|
### node.js: [Buffer](https://nodejs.org/api/buffer.html)-backed
|
||
|
|
||
|
* **[bytebuffer-node.js](https://raw.githubusercontent.com/dcodeIO/ByteBuffer.js/master/dist/bytebuffer-node.js)**
|
||
|
uses a [node Buffer](https://nodejs.org/api/buffer.html) as its backing buffer and accessor.
|
||
|
|
||
|
Also available as `bytebuffer` on [npm](https://www.npmjs.org/package/bytebuffer) and
|
||
|
[bower](http://bower.io/search/?q=bytebuffer).
|