gzread

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Binary-safe gz-file read
gzread(resource $streamint $length): string|false
    {

        
$archiveFile gzopen($file'rb');

        
$targetFile fopen($targetFilepath'wb');

        while (
$string gzread($archiveFile4096)) {

            
fwrite($targetFile$stringPlatform::strlen($string));

        }

        
gzclose($archiveFile);