| @@ 467-474 (lines=8) @@ | ||
| 464 | private function getFileContent(SplFileInfo $file, $needsCompress) { |
|
| 465 | if ($needsCompress) { |
|
| 466 | switch ($this->compression['algorithm']) { |
|
| 467 | case 'gzip': |
|
| 468 | return gzcompress( |
|
| 469 | file_get_contents( |
|
| 470 | $file->getRealPath() |
|
| 471 | ), |
|
| 472 | (int)$this->compression['level'], |
|
| 473 | ZLIB_ENCODING_GZIP |
|
| 474 | ); |
|
| 475 | case 'deflate': |
|
| 476 | return gzcompress( |
|
| 477 | file_get_contents( |
|
| @@ 475-482 (lines=8) @@ | ||
| 472 | (int)$this->compression['level'], |
|
| 473 | ZLIB_ENCODING_GZIP |
|
| 474 | ); |
|
| 475 | case 'deflate': |
|
| 476 | return gzcompress( |
|
| 477 | file_get_contents( |
|
| 478 | $file->getRealPath() |
|
| 479 | ), |
|
| 480 | (int)$this->compression['level'], |
|
| 481 | ZLIB_ENCODING_DEFLATE |
|
| 482 | ); |
|
| 483 | } |
|
| 484 | } |
|
| 485 | return fopen($file->getRealPath(), 'r'); |
|