Dawid Weiss created COMPRESS-339:
------------------------------------

             Summary: deprecate get() methods on SevenZFile and add 
getNextEntry().getInputStream() instead
                 Key: COMPRESS-339
                 URL: https://issues.apache.org/jira/browse/COMPRESS-339
             Project: Commons Compress
          Issue Type: Improvement
            Reporter: Dawid Weiss
            Priority: Minor


This is a conclusion from me looking at {{SevenZFile}} -- its API is currently 
very odd; shaped much like InputStream (three flavors of get method), 
SevenZFile doesn't actually implement InputStream so it needs to be wrapped in 
awkward custom code. This can result in very realistic performance degradation 
when somebody calls get() (a single byte at a time)  repeatedly over and over 
again. 

I think it would make a lot of sense to deprecate and eventually remove those 
methods from SevenZFile, replacing them with a method getInputStream() on an 
SevenZArchiveEntry. This method would return a low-level stream leading to the 
entry's decoded data (possibly buffered to decode in sensible blocks). This 
would also open up the possibility of returning thread-safe SevenZArchiveEntry 
instances so that multiple entries could be decompressed in parallel, for 
example.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to