commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <>
Subject Re: [compress] Discussing compress
Date Tue, 14 Feb 2006 12:51:04 GMT
> 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
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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message