1
1
![ ByteBuffer.js - A Java-like ByteBuffer] ( https://raw.github.com/dcodeIO/ByteBuffer.js/master/ByteBuffer.png )
2
2
======================================
3
- Provides a full-features ByteBuffer implementation using typed arrays. It also tries to abstract a bit of
4
- the complexity away by providing convenience methods for those who just want to write stuff without caring about signed,
5
- unsigned and the actual bit sizes. It's also one of the components driving [ ProtoBuf.js] ( https://github.com/dcodeIO/ProtoBuf.js )
6
- and the [ PSON] ( https://github.com/dcodeIO/PSON ) reference implementation.
3
+ Provides a full-features ByteBuffer implementation using typed arrays. It's one of the core components driving
4
+ [ ProtoBuf.js] ( https://github.com/dcodeIO/ProtoBuf.js ) and the [ PSON] ( https://github.com/dcodeIO/PSON ) reference
5
+ implementation.
7
6
8
7
* Note:* The API behind toHex and toString has changed with ByteBuffer 2.0.0, which is a generally revised release, in
9
8
favor of making this more intuitive.
@@ -19,7 +18,7 @@ What can it do?
19
18
* Relative and absolute zero-copy operations
20
19
* Automatic resizing (always doubles)
21
20
* Chaining of all operations that do not return a specific value
22
- * Slicing, appending, prepending etc.
21
+ * Slicing, appending, prepending, flip, reset, etc.
23
22
24
23
And much more... (see the API documentation)
25
24
@@ -103,41 +102,21 @@ Downloads
103
102
104
103
Documentation
105
104
-------------
106
- * [ View documentation] ( http://htmlpreview.github.com/?http://github.com/dcodeIO/ByteBuffer.js/master/docs/ByteBuffer.html )
105
+ * [ View the API documentation] ( http://htmlpreview.github.com/?http://github.com/dcodeIO/ByteBuffer.js/master/docs/ByteBuffer.html )
107
106
108
107
Tests (& Examples) [ ![ Build Status] ( https://travis-ci.org/dcodeIO/ByteBuffer.js.png?branch=master )] ( https://travis-ci.org/dcodeIO/ByteBuffer.js )
109
108
------------------
110
109
* [ View source] ( https://github.com/dcodeIO/ByteBuffer.js/blob/master/tests/suite.js )
111
110
* [ View report] ( https://travis-ci.org/dcodeIO/ByteBuffer.js )
112
111
113
- Prerequisites to run it against IE<10, FF<15, Chrome<9 etc.
114
- -----------------------------------------------------------
115
- * Working ArrayBuffer & DataView implementations (i.e. use a [ polyfill] ( https://github.com/inexorabletash/polyfill#typed-arrays-polyfill ) )
116
-
117
- Usage with Closure Compiler's advanced optimizations
118
- ----------------------------------------------------
119
- You basically have the following three options:
120
-
121
- #### ByteBuffer.js as external dependency ####
122
- If you compile your code but want to use ByteBuffer.js as an external dependency that's not actually compiled "into"
123
- your project, add the provided [ externs file] ( https://github.com/dcodeIO/ByteBuffer.js/blob/master/externs/ByteBuffer.js )
124
- to your compilation step (which usually excludes compilation of ByteBuffer.js).
125
-
126
- #### ByteBuffer.js compiled into your project and exposed ####
127
- Use [ ByteBuffer.js] ( https://github.com/dcodeIO/ByteBuffer.js/blob/master/ByteBuffer.js ) if you want the ByteBuffer class
128
- to be exposed to the outside world (of JavaScript) so it can be called by external scripts. This also removes the
129
- requirement of using externs but the compiler will also keep possibly unused code.
130
-
131
- #### ByteBuffer.js fully compiled into your project ####
132
- Use [ ByteBuffer.noexpose.js] ( https://github.com/dcodeIO/ByteBuffer.js/blob/master/ByteBuffer.noexpose.js ) if you want
133
- the ByteBuffer class to be fully integrated into your (single file) project. Of course no external scripts will be able
134
- to call it or its method (trivially) because quite everything will become renamed, some parts inlined and moved around.
135
- This will also allow the compiler to actually remove unused code.
112
+ Support for IE<10, FF<15, Chrome<9 etc.
113
+ ---------------------------------------
114
+ * Requires a working ArrayBuffer & DataView implementations (i.e. use a [ polyfill] ( https://github.com/inexorabletash/polyfill#typed-arrays-polyfill ) )
136
115
137
116
Contributors
138
117
------------
139
- [ Dretch] ( https://github.com/Dretch ) (IE8 comp. )
118
+ [ Dretch] ( https://github.com/Dretch ) (IE8 compatibility )
140
119
141
120
License
142
121
-------
143
- Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.html
122
+ Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.html
0 commit comments