docs: function() {
  
  		// Header length
  		var header_length = 32;
  
  		// Write down null-terminated string lookup table in the end
  		var stream8offset = this.stream8.offset;
  		for (var i=0; i<this.stringLookup.length; ++i) {
  			this.stream8.write( new Buffer( this.stringLookup[i] ) );
  			this.stream8.write( new Buffer( [0] ) );
  		}
  		// console.log("ST: len="+(this.stream8.offset - stream8offset)+", sl=", this.stringLookup );
  
  		// Encode the object signature table
  		var stream16offset = this.stream16.offset;
  		for (var i=0; i<this.plainObjectSignatureTable.length; ++i)
  			this.stream16.write( this.plainObjectSignatureTable[i] );
  		// console.log("OT: len="+(this.stream16.offset - stream16offset)+", ot=", this.plainObjectSignatureTable );
  
  		// Finalize individual streams
  		this.stream64.finalize();
  		this.stream32.finalize();
  		this.stream16.finalize();
  		this.stream8.finalize();
  
  		// Calculate the value to put on the profile table ID
  		var profile_id = 0x00;
  		if (this.profile.count == 1) {
  			profile_id = this.profile.id;
  		}
  
  		// If sparse bundle update stream8
  		var totalSize = 0;
  		if (this.sparse) {
  
  			// Overwrite header
  			this.stream8.writeAt( 2,  pack2b( profile_id ) );  	// Update object table ID
  			this.stream8.writeAt( 6,  pack2b( this.profile.count ) ); 	// Number of profile tables
  			this.stream8.writeAt( 8,  pack4b( this.stream64.offset ) ); // 64-bit buffer lenght
  			this.stream8.writeAt( 12, pack4b( this.stream32.offset ) ); // 32-bit buffer lenght
  			this.stream8.writeAt( 16, pack4b( this.stream16.offset ) ); // 16-bit buffer length
  			this.stream8.writeAt( 20, pack4b( this.stream8.offset - header_length ) );  // 8-bit buffer length (exclude header)
  			this.stream8.writeAt( 24, pack4b( this.stream8.offset - stream8offset ) ); // Length of string table
  			this.stream8.writeAt( 28, pack4b( this.stream16.offset - stream16offset ) ); // Length of signature table
  
  			// TODO: Separate stream8 in two in order to load them in parallel
  
  			// Close streams
  			this.stream8.close();  this.stream16.close(); 
  			this.stream32.close(); this.stream64.close(); 
  
  			// Calculate total size
  			totalSize = this.stream8.offset +  this.stream16.offset + 
  						this.stream32.offset + this.stream64.offset;
  
  			// Update filename
  			this.filename += ".jbbp";
  
  			// Write summar header
  			if ((this.logFlags & LOG.SUMM)) {
  				console.info("Encoding size =",totalSize,"bytes");
  				console.info("     8b chunk =",this.stream8.offset,"bytes");
  				console.info("    16b chunk =",this.stream16.offset,"bytes");
  				console.info("    32b chunk =",this.stream32.offset,"bytes");
  				console.info("    64b chunk =",this.stream64.offset,"bytes");
  
  			}
  
  		}
  
  		// If not separating, merge everything
  		else {
  
  			// Open final stream
  			var finalStream = new BinaryStream( this.filename + '.jbb', 8 );
  			finalStream.write( pack2b( 0x4231 ) );  			 // Magic header
  			finalStream.write( pack2b( profile_id ) ); 	 		 // Object Table ID
  			finalStream.write( pack2b( VERSION ) );	  			 // Version
  			finalStream.write( pack2b( this.profile.count ) );   // Number of profile tables
  			finalStream.write( pack4b( this.stream64.offset ) ); // 64-bit buffer lenght
  			finalStream.write( pack4b( this.stream32.offset ) ); // 32-bit buffer lenght
  			finalStream.write( pack4b( this.stream16.offset ) ); // 16-bit buffer length
  			finalStream.write( pack4b( this.stream8.offset ) );  // 8-bit buffer length
  			finalStream.write( pack4b( this.stream8.offset - stream8offset ) ); // Length of string table
  			finalStream.write( pack4b( this.stream16.offset - stream16offset ) ); // Length of signature table
  
  			// Merge individual streams
  			finalStream.merge( this.stream64 ); finalStream.merge( this.stream32 );
  			finalStream.merge( this.stream16 ); finalStream.merge( this.stream8 );
  
  			// Close
  			finalStream.finalize();
  			finalStream.close();
  			totalSize = finalStream.offset;
  
  			// Close and delete helper stream files
  			this.stream8.close();  fs.unlink( this.filename + '.jbbp' );
  			this.stream16.close(); fs.unlink( this.filename + '_b16.jbbp' );
  			this.stream32.close(); fs.unlink( this.filename + '_b32.jbbp' );
  			this.stream64.close(); fs.unlink( this.filename + '_b64.jbbp' );
  
  			// Update filename
  			this.filename += ".jbb";
  
  			// Write summar header
  			if ((this.logFlags & LOG.SUMM)) {
  				console.info("Encoding size =",finalStream.offset,"bytes");
  			}
  
  		}
  
  		// Write protocol overhead table
  		if ((this.logFlags & LOG.PDBG) != 0) {
  			console.info("-----------------------------------");
  			console.info(" Binary Protocol Overhead Analysis");
  			console.info("-----------------------------------");
  			console.info(" 64-bit Stream       : ", this.stream64.offset, "b");
  			console.info(" 32-bit Stream       : ", this.stream32.offset, "b");
  			console.info(" 16-bit Stream       : ", this.stream16.offset, "b");
  			console.info("  8-bit Stream       : ", this.stream8.offset,  "b");
  			console.info("-----------------------------------");
  			console.info(" Control Op-Codes    : ", this.counters.op_ctr, "b");
  			console.info(" Primitive Op-Codes  : ", this.counters.op_prm, "b");
  			console.info(" String References   : ", this.counters.ref_str, "b");
  			console.info(" I-Refs              : ", this.counters.op_iref, "b");
  			console.info(" X-Refs              : ", this.counters.op_xref, "b");
  			console.info(" Array Headers       : ", this.counters.arr_hdr, "b");
  			console.info(" Array Steering Data : ", this.counters.arr_dat, "b");
  			console.info(" Array Chunks        : ", this.counters.arr_chu, "b");
  			console.info(" Buffer Headers      : ", this.counters.dat_hdr, "b");
  			var sum = this.counters.op_ctr + this.counters.op_prm + this.counters.arr_dat +
  					  this.counters.ref_str + this.counters.op_iref + this.counters.op_xref +
  					  this.counters.arr_hdr + this.counters.arr_chu + this.counters.dat_hdr;
  			console.info("-----------------------------------");
  			console.info(" NUM_DWS             : ",this.counters.arr_dws);
  			console.info(" NUM_DELTA_FLOAT     : ",this.counters.arr_delta_float);
  			console.info(" NUM_DELTA_INT       : ",this.counters.arr_delta_int);
  			console.info(" NUM_REPEATED        : ",this.counters.arr_num_repeated);
  			console.info(" NUM_RAW             : ",this.counters.arr_num_raw );
  			console.info(" NUM_SHORT           : ",this.counters.arr_num_short);
  			console.info(" PRIM_BULK_PLAIN     : ",this.counters.arr_prim_bulk_plain);
  			console.info(" PRIM_BULK_KNOWN     : ",this.counters.arr_prim_bulk_known);
  			console.info(" PRIM_SHORT          : ",this.counters.arr_prim_short);
  			console.info(" PRIM_REPEATED       : ",this.counters.arr_prim_repeated);
  			console.info(" PRIM_RAW            : ",this.counters.arr_prim_raw);
  			console.info(" PRIM_CHUNK          : ",this.counters.arr_prim_chunk);
  			console.info(" EMPTY               : ",this.counters.arr_empty);
  			console.info("-----------------------------------");
  			console.info("");
  			var perc = ((sum / totalSize) * 100).toFixed(2);
  			console.info(" Total Overhead     : ",sum,"b ("+perc+" %)");
  		}
  
  	}