code: function createChunk(type, data) {
  	const length = typeof data != 'undefined' ? data.length : 0;
  	const chunk = Buffer.alloc(4 + 4 + length + 4);
  
  	chunk.writeUInt32BE(length, 0);
  	chunk.fill(type, 4, 8, 'utf8');
  	if (typeof data != 'undefined') {
  		chunk.fill(data, 8, chunk.length - 4);
  	}
  	chunk.writeUInt32BE(crc32(chunk.slice(4, -4)), chunk.length - 4);
  
  	return chunk;
  }
docs: Create a chunk of the given type with the given data.
  
  @param type
  @param data
  @returns {Buffer}