*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
* BZIP2 compression stream
*
* @param $streamData Mixed non-object stream data
- * @return $streamData The compressed stream data
+ * @return $streamData The compressed stream data
* @throws InvalidObjectException If the stream is an object
*/
public function compressStream ($streamData) {
* BZIP2 decompression stream
*
* @param $streamData Mixed non-object stream data
- * @return $streamData The decompressed stream data
+ * @return $streamData The decompressed stream data
* @throws InvalidObjectException If the stream is an object
*/
public function decompressStream ($streamData) {
throw new InvalidObjectException($streamData, self::EXCEPTION_UNEXPECTED_OBJECT);
} // END - if
+ // Decompress it
+ $streamData = bzdecompress($streamData, true);
+
// Return the decompressed stream
- return bzdecompress($streamData);
+ return $streamData;
}
/**