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