Re: attempting to work out conversion/compression API
| From: | Gregory Beaver | Date: | Thu, 10 Apr 2008 12:24:32 +0000 |
| Subject: | Re: attempting to work out conversion/compression API | ||
| References: | 1 2 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-5361@lists.php.net to get a copy of this message | ||
Lars Strojny wrote:
> Hi Greg,
>
> Am Mittwoch, den 09.04.2008, 22:53 -0500 schrieb Gregory Beaver:
> [...]
>
>> How does this look for a conversion/compression API?
>>
>
> I like it pretty much, except one little detail.
> [...]
>
>> void PharFileInfo->compress(int $compression) // first 4 throw
>> exceptions on failure like other Phar methods
>> void PharFileInfo->decompress()
>>
>
>
>> void Phar->compressFiles(int $compression)
>> void Phar->decompressFiles()
>>
>
> I wonder if Phar->compress()/->decompress() wouldn't be sufficient as of
> course the compress()-method of an archive has different semantics. I
> see a small potential for confusion, but I'm not sure how huge that
> potential is.
The potential is huge because it is also possible to compress the entire
archive. This method compresses files *within* the archive.
Greg