annotate resources/osc/node_modules/binpack/readme.md @ 271:fb9c28a4676b prerelease

Added osc example project and node script for testing
author Liam Donovan <l.b.donovan@qmul.ac.uk>
date Tue, 17 May 2016 16:01:06 +0100
parents
children
rev   line source
l@271 1 [![build status](https://secure.travis-ci.org/russellmcc/node-binpack.png)](http://travis-ci.org/russellmcc/node-binpack)
l@271 2 # binpack
l@271 3
l@271 4 _Deprecated binary packing utilities for node.js_
l@271 5
l@271 6 ## What's all this?
l@271 7
l@271 8 node now actually contains native code for packing binary buffers so this module is no longer needed. do not use in new code.
l@271 9
l@271 10 see the included COPYING file for licensing.
l@271 11
l@271 12 the core of the module is the set of `pack`/`unpack` pair functions. The meaning should be clear from the name - for example, `packInt32` packs a given javascript number into a 32-bit int inside a 4-byte node.js Buffer, while `unpackFloat32` unpacks a 4-byte node.js Buffer containing a native floating point number into a javascript number.
l@271 13
l@271 14 The following types are available for both pack and unpack:
l@271 15
l@271 16 Float32
l@271 17 Float64
l@271 18 Int8
l@271 19 Int16
l@271 20 Int32
l@271 21 UInt8
l@271 22 UInt16
l@271 23 UInt32
l@271 24
l@271 25 Each `pack*` function takes a javascript number and outputs a node.js Buffer.
l@271 26
l@271 27 Each `unpack*` function takes a node.js Buffer and outputs a javascript number.
l@271 28
l@271 29 Both types of functions take an optional second argument. If this argument is `"big"`, the output is put in big endian format. If the argument is `"little"`, the output is put in little endian format. If the argument is anything else or non-existent, we default to "little" endian [THIS IS NEW BEHAVIOR IN 0.0.15 - previous version would default to the native encoding.].