Closed semihaksu closed 3 years ago
ZIP64 is not base64 encoding, but a zip format extension to support files larger than 4GB or more than 65536 files in an archive.
base64 encoding is irrelevant :) thats the output format which I used. Main question is if I use ZIP64 for files less than 4gb?
Not. It doesn't make sense. Technically, this can be done by adding Zip64ExtraField to extra fields.
I don't understand, how can I create Zip64 String output.
$content = 'test';
$zipFile = new \PhpZip\ZipFile();
$zipFile->addFromString('Msg', $content);
$zipFile->setCompressionMethodEntry('Msg', \PhpZip\Constants\ZipCompressionMethod::DEFLATED);
$zipFile->setCompressionLevel(\PhpZip\Constants\ZipCompressionLevel::MAXIMUM);
$zipFile->setCompressionLevelEntry('Msg', \PhpZip\Constants\ZipCompressionLevel::MAXIMUM);
$rawZipArchiveBytes = $zipFile->outputAsString();
echo base64_encode($rawZipArchiveBytes);
$zipFile->close();
my code example like below. but It gives me zip not zip64