Greg Beaver [Mon, 28 Jan 2008 20:18:15 +0000 (20:18 +0000)]
fix PharFileInfo->setAlias (was wildly broken)
fix directory creation in zip archives
update zip tests to use phar to create the zip, and then copy to a new file
Andrey Hristov [Mon, 28 Jan 2008 18:27:49 +0000 (18:27 +0000)]
MFB: More optimizations - less MM calls
Clearly separated fetching (physical reading) from decoding phases (data
interpretation). Threaded fetching added but disabled as needs more work for
Windows. For Linux needs some touches to add pthreads if this is enabled,
probably with a compile-time switch.
The code reorganisation makes it easy to add also async API, similar to
cURL's one.
Greg Beaver [Mon, 28 Jan 2008 08:52:08 +0000 (08:52 +0000)]
remove ext/zip dependency entirely, write better native zip support
re-organize, create util.c, move entry_info/archive_data/entry_data access methods to this file
refactor entry->fp, now this is abstracted with phar_get_efp() and phar_seek_efp(), fixes all weird dependency issues
permanently solve the "millions of file pointers" issue for read access. All compressed files are read into a single
temporary stream, and their constraints are controlled by the entry->fp abstraction
Improvements in this zip implementation over ext/zip:
* full read/write support for bzip2 compressed files
* much more efficient access for accessing only a few files within large zip files, as crc/header validation is
done just-in-time
* full stream support for opendir/rename/rmdir/mkdir as well as all of the other stream funcs
* full support for setting file perms via Phar::chmod(), stored as zip-standard extra field
* no problem with large zips and many open file pointers
# TODO: add big-endian system support for tar/zip file format headers, otherwise the implementation is complete
# TODO: test on windows and fix any windows-specific issues
# TODO: verify zips created work with unzip/winzip/windows explorer and so on
Scott MacVicar [Fri, 25 Jan 2008 18:11:19 +0000 (18:11 +0000)]
MFB: Fix html_entity_decode when converting numeric html entities, the numeric values for the extended character set don't correspond to that of windows-1251 and cp866.
Steph Fox [Fri, 25 Jan 2008 17:26:18 +0000 (17:26 +0000)]
- Rewrite stub to take up slightly less space
- Fix tests
- Test phars should probably be regenerated, although only one fails here currently (nophar.phar in web context)
Greg Beaver [Wed, 23 Jan 2008 23:19:03 +0000 (23:19 +0000)]
initial work on more efficient zip implementation, read support working, write not implemented yet
This implementation will support read/write of extra field headers, both zlib/bzip2 compression read/write
it will also delay header comparison/crc32 check until file open, making opening a single file
within the zip much more efficient for large zip files
it also uses emalloc/php streams and is therefore less likely to leak.
this code is not yet built in config.m4/config.w32
Greg Beaver [Mon, 21 Jan 2008 05:28:09 +0000 (05:28 +0000)]
fix problems found while documenting. Throw consistent exceptions, chmod is not allowed on
temporary directories, but is allowed on regular ones
allow uncompressAllFiles() to decompress a gzip/bzipped tar archive
fix some protos
Greg Beaver [Sun, 20 Jan 2008 00:49:45 +0000 (00:49 +0000)]
add web-based support for default stub, now phars written with webPhar() will work
out of the box regardless of server configuration with phar file format
split up stub.h strings into 2046 byte chunks because MS VC 6 is friggin stupid