A minimal node module allowing the reading and writing of data in the SCON format. The SCON format, created by Aritz J Beobide-Cardinal (ARitz Cracker) and James R Swift, is an extendable binary file format that was created to store data more efficiently than the popular JSON standard.
npm install scon --save
var useMagicNumber = true; //If useMagicNumber is undefined or null, it will default to true;var scon = ;// If you wish to encode binary data, use NodeJS Buffers or Uint8Arraysvar encoded = scon;// encoded will be a Buffer or Uint8Array depending on the platform you're using it on.var decoded = scon;// SCON also now supports "Stream decoding". These are intended for use where you get a stream of never-ending scon data.// scon.streamDecode returns a function which expects a chunk of data (Uint8Array, Buffer, or String with characters no higher than 255)// For example:readableStream;// It is important to note if the chunk contains multiple complete SCONs, the callback will be called IN SYNC, this is to make sure that the entire chunk is read before the next one arrives.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
1.1.0 Ints now take up less bytes depending on how big they are. Also, bugfixes.
1.0.3 Added TravisCI intergration and tests
1.0.2 Added support for NaN and 64 bit floats
1.0.0 Added support for arrays, booleans, and nulls!
0.9.0 Major update in module structure, and added error handling.
0.8.2 Removed left over tests.
0.8.0 Initial release