pack = function(serialized) {
            var cursor = 0,
                i = 0,
                j = 0,
                endianness = BIG_ENDIAN;

            var ab = new ArrayBuffer(serialized[0].byte_length + serialized[0].header_size);
            var view = new DataView(ab);

            for (i = 0; i < serialized.length; i++) {
                var start = cursor,
                    header_size = serialized[i].header_size,
                    type = serialized[i].type,
                    length = serialized[i].length,
                    value = serialized[i].value,
                    byte_length = serialized[i].byte_length,
                    type_name = Length[type],
                    unit = type_name === null ? 0 : root[type_name + 'Array'].BYTES_PER_ELEMENT;

                // Set type
                if (type === Types.BUFFER) {
                    // on node.js Blob is emulated using Buffer type
                    view.setUint8(cursor, Types.BLOB, endianness);
                } else {
                    view.setUint8(cursor, type, endianness);
                }
                cursor += TYPE_LENGTH;

                if (debug) {
                    console.info('Packing', type, TypeNames[type]);
                }

                // Set length if required
                if (type === Types.ARRAY || type === Types.OBJECT) {
                    view.setUint16(cursor, length, endianness);
                    cursor += LENGTH_LENGTH;

                    if (debug) {
                        console.info('Content Length', length);
                    }
                }

                // Set byte length
                view.setUint32(cursor, byte_length, endianness);
                cursor += BYTES_LENGTH;

                if (debug) {
                    console.info('Header Size', header_size, 'bytes');
                    console.info('Byte Length', byte_length, 'bytes');
                }

                switch (type) {
                    case Types.NULL:
                    case Types.UNDEFINED:
                        // NULL and UNDEFINED doesn't have any payload
                        break;

                    case Types.STRING:
                        if (debug) {
                            console.info('Actual Content %c"' + value + '"', 'font-weight:bold;');
                        }
                        for (j = 0; j < length; j++, cursor += unit) {
                            view.setUint16(cursor, value.charCodeAt(j), endianness);
                        }
                        break;

                    case Types.NUMBER:
                    case Types.BOOLEAN:
                        if (debug) {
                            console.info('%c' + value.toString(), 'font-weight:bold;');
                        }
                        view['set' + type_name](cursor, value, endianness);
                        cursor += unit;
                        break;

                    case Types.INT8ARRAY:
                    case Types.INT16ARRAY:
                    case Types.INT32ARRAY:
                    case Types.UINT8ARRAY:
                    case Types.UINT16ARRAY:
                    case Types.UINT32ARRAY:
                    case Types.FLOAT32ARRAY:
                    case Types.FLOAT64ARRAY:
                        var _view = new Uint8Array(view.buffer, cursor, byte_length);
                        _view.set(new Uint8Array(value.buffer));
                        cursor += byte_length;
                        break;

                    case Types.ARRAYBUFFER:
                    case Types.BUFFER:
                        var _view = new Uint8Array(view.buffer, cursor, byte_length);
                        _view.set(new Uint8Array(value));
                        cursor += byte_length;
                        break;

                    case Types.BLOB:
                    case Types.ARRAY:
                    case Types.OBJECT:
                        break;

                    default:
                        throw 'TypeError: Unexpected type found.';
                }

                if (debug) {
                    binary_dump(view, start, cursor - start);
                }
            }

            return view;
        }
packs seriarized elements array into a packed ArrayBuffer
@param  {Array} serialized Serialized array of elements.
@return {DataView} view of packed binary