lib/HalModuleParser.js
function(fileInfo, callback) {
		if (!Buffer.isBuffer(fileInfo.fileBuffer)) {
			return when.reject('fileBuffer was invalid');
		}

		var that = this;
		var allDone = pipeline([
			function() {
				return that._validateCRC(fileInfo.fileBuffer);
			},
			function(crcInfo) {
				fileInfo.crc = crcInfo;

				return that._readPrefix(fileInfo.fileBuffer);
			},

			function(prefixInfo) {
				fileInfo.prefixInfo = prefixInfo;

				return that._readSuffix(fileInfo.fileBuffer);
			},
			function(suffixInfo) {
				fileInfo.suffixInfo = suffixInfo;

				return when.resolve();
			},

			function() {
				return fileInfo;
			}
		]);

		if (callback) {
			when(allDone).then(
				function(info) {
					callback(info, null);
				},
				function(err) {
					callback(null, err);
				});
		}

		return allDone;
	}
function(fileInfo, callback) {
		if (!Buffer.isBuffer(fileInfo.fileBuffer)) {
			return when.reject('fileBuffer was invalid');
		}

		var that = this;
		var allDone = pipeline([
			function() {
				return that._validateCRC(fileInfo.fileBuffer);
			},
			function(crcInfo) {
				fileInfo.crc = crcInfo;

				return that._readPrefix(fileInfo.fileBuffer);
			},

			function(prefixInfo) {
				fileInfo.prefixInfo = prefixInfo;

				return that._readSuffix(fileInfo.fileBuffer);
			},
			function(suffixInfo) {
				fileInfo.suffixInfo = suffixInfo;

				return when.resolve();
			},

			function() {
				return fileInfo;
			}
		]);

		if (callback) {
			when(allDone).then(
				function(info) {
					callback(info, null);
				},
				function(err) {
					callback(null, err);
				});
		}

		return allDone;
	}
/*
broken out if you're working with a buffer instead, expects a
'fileInfo' object with the
'fileBuffer' property set to your buffer.
@param Object fileInfo
@param Function callback
@returns Promise