comparison resources/osc/node_modules/binpack/readme.md @ 284:7bfb25a2e158 Doxy prerelease

Merge
author Robert Jack <robert.h.jack@gmail.com>
date Tue, 17 May 2016 15:53:24 +0100
parents fb9c28a4676b
children
comparison
equal deleted inserted replaced
269:ac8eb07afcf5 284:7bfb25a2e158
1 [![build status](https://secure.travis-ci.org/russellmcc/node-binpack.png)](http://travis-ci.org/russellmcc/node-binpack)
2 # binpack
3
4 _Deprecated binary packing utilities for node.js_
5
6 ## What's all this?
7
8 node now actually contains native code for packing binary buffers so this module is no longer needed. do not use in new code.
9
10 see the included COPYING file for licensing.
11
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.
13
14 The following types are available for both pack and unpack:
15
16 Float32
17 Float64
18 Int8
19 Int16
20 Int32
21 UInt8
22 UInt16
23 UInt32
24
25 Each `pack*` function takes a javascript number and outputs a node.js Buffer.
26
27 Each `unpack*` function takes a node.js Buffer and outputs a javascript number.
28
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.].