commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <ma...@ops.co.at>
Subject Re: [compress] Discussing compress
Date Tue, 14 Feb 2006 12:51:04 GMT
Hi!
> Compress.getInstance(String compressorType);
+1 or even better Compress.getInstance(CompressorType compressorType);

> Compress.getInstance(File compressedFile);
>
> which loads a compressed file with the correct Compressor.
For this to work you need a configuration file, and later it might be
fine to have something like Compress.getInstance(InputStream is).
Often it is not possible to determine the compression based on the
filename extension, you might have to look at the stream or its mime type.

So I think this should be solved by a higher level api.

Said that, I think this should be the part where commons-vfs comes in.

It already provides a unique api to access a wide variety of
filesystems/types.
It allows to lookup the corresponding fileProvider (the one which will
do the decompression then) based on "filename extension" or "mime type".

So, from my point of view compress should avoid having a configuration
at all and should concentrate to be a compact library.

---
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message