<?php
/**
 * @license MIT
 *
 * Modified by emberprice on 29-July-2026 using {@see https://github.com/BrianHenryIE/strauss}.
 */

namespace EmberPrice\Vendor\PhpOffice\PhpSpreadsheet\Writer;

use EmberPrice\Vendor\ZipStream\Option\Archive;
use EmberPrice\Vendor\ZipStream\ZipStream;

/**
 * Either ZipStream2 or ZipStream3, but not both, may be used.
 * For code coverage testing, it will always be ZipStream3.
 *
 * @codeCoverageIgnore
 */
class ZipStream2
{
    /**
     * @param resource $fileHandle
     */
    public static function newZipStream($fileHandle): ZipStream
    {
        $options = new Archive();
        $options->setEnableZip64(false);
        $options->setOutputStream($fileHandle);

        return new ZipStream(null, $options);
    }
}
