/** * @abstract returns a FileReader-Object of the uncompressed FileReader-Data-Object * @return clFileReader object Instanz of class clFileReader */ private function BlockUncompress($data, $info_blockID = '') { $data->setOffset(0); $size = $data->len() - 4; $file = new clFile(); if ($size < 2) { $this->m_error->addError('unable to decompress section [#' . $info_blockID . ']: block-size-error - size: ' . $size); return $file->getFileReader(); //- empty File } $usize = $data->readInt(4); if ($usize + 30 < $size || $usize > $size * 10) { $this->m_error->addError('unable to decompress section [#' . $info_blockID . ']: uncompress-size-error - size: ' . $size . ' - uncompress-size:' . $usize); return $file->getFileReader(); //- empty File } $ucdata = @gzuncompress($data->readStr($size)); if (strlen($ucdata) < 1) { $this->m_error->addError('unable to decompress section [#' . $info_blockID . ']: gzuncompress-error'); return $file->getFileReader(); //- empty File } $file->readFromString($ucdata); return $file->getFileReader(); }