Binary
From CommonJS Spec Wiki
(Redirected from ServerJS/Binary)
STATUS: PROPOSALS, DISCUSSION
JavaScript does not have a binary data type. However, in server-side scenarios, binary data needs to be often processed. That is why we need some working byte or binary array or string class.
Proposals
- Binary/A Proposal A from Ondras
- Binary/B Proposal B from Kris Kowal (implemented by a few platforms)
- Binary/C Proposal C from Daniel Friesen
- Binary/D Proposal D from Kris Kowal (based on Binary/B, -array-comprehsiveness, +bits, +radix-encoding)
- Binary/E Proposal E (based on Binary/D with byte string [[Get]] returning Number instead of ByteString, +Binary base type, -bits, -radix-encoding, -patching)
- Binary/Lite Proposal "Lite" from Ondras (single Binary type -charsets)
- Binary/F Proposal F (based on Binary/E but viciously trimmed, -ByteString, s/ByteArray/Buffer/ -flexible length)
Binary/B is the one which was standardized. Additional work was done on subsequent proposals to find something of greater use and less weight, but that work is essentially unfinished.
Prior Art
- Adobe AIR's ByteArray
- Mozilla's nsIBinaryInputStream
- Mozilla's nsIBinaryOutputStream
- EJScript ByteArray
- Google Gears Blob
- JSlibs Blob
- Flusspferd Blob repository link (since it has been removed, the docs might go away at some point)
- W3C File API (blob, FileBlob, readAsBinaryString, readAsDataUrl)
Relevant Discussions
- First Proposal
- Comments on Binary object
- Binary API Brouhaha
- ByteArray and ByteString proposal regarding proposal B
- Binary/C - range for memcopy
- ByteString / ByteArray duality
- Alternate binary proposal regarding Binary/C
- Typed Arrays strawman on the EcmaScript wiki which cites Khronos's proposed TypedArray spec as its primary source.
Encodings are a related topic.