pear/data/Archive/design/design.txt                                                                 0000644                 00000003774 15117524275 0013274 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       eZ publish Enterprise Component: Archive, Design
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Introduction
============

Purpose of the Archive package
------------------------------

The archive package takes care of the different archive and compression
formats and handles them universally. Archive provides the basic
implementation to extract and create the whole or a part of the archive.

Some research will be done during the design phase whether the PHP stream
wrapper classes can be used to provide a common interface. 


Current implementation
----------------------

The current implementation implements only the Tar archive. The implemented 
algorithm doesn't support many (or if possible all) Tar archive-types.
Furthermore, a clean up of the design and code will be done to provide a
better interface.


Requirements
============

Design goals
------------

The Archive package should (at least) provide a low-level interface where
simply (a part of) the files can be extracted to a specific location or an
archive can be extended with new files. On top of this interface a part of a
virtual file system can be build. In another package?


Design
======

Introduction
------------

In the design we make a distinction between archivers and compression
libraries. If a format supports both, it is categorized as an archiver.

The compression libraries, if not available in PHP, will be implemented as a
stream. The stream functions from PHP have a different resource handler for
files and directories. Therefore t