src/Zip.php
protected function encodeFilename($original)
    {
        $cp437 = $this->utf8ToCp($original);
        if ($cp437 === $original) {
            return array($original, '');
        }

        $extra = pack(
            'vvCV',
            0x7075, // tag
            strlen($original) + 5, // length of file + version + crc
            1, // version
            crc32($original) // crc
        );
        $extra .= $original;

        return array($cp437, $extra);
    }
protected function encodeFilename($original)
    {
        $cp437 = $this->utf8ToCp($original);
        if ($cp437 === $original) {
            return array($original, '');
        }

        $extra = pack(
            'vvCV',
            0x7075, // tag
            strlen($original) + 5, // length of file + version + crc
            1, // version
            crc32($original) // crc
        );
        $extra .= $original;

        return array($cp437, $extra);
    }
protected function encodeFilename ( $ original ) { $ cp437 = $ this -> utf8ToCp ( $ original ) ; if ( $ cp437 === $ original ) { return array ( $ original , '' ) ; } $ extra = pack ( 'vvCV' , 0x7075 , // tag strlen ( $ original ) + 5 , // length of file + version + crc 1 , // version crc32 ( $ original ) // crc ) ; $ extra .= $ original ; return array ( $ cp437 , $ extra ) ; }
Returns an allowed filename and an extra field header

When encoding stuff outside the 7bit ASCII range it needs to be placed in a separate
extra field

@param $original
@return array($filename, $extra)
Returns an allowed filename and an extra field header