The refactoring os ZipArchiveOutputStream to use StreamCompressor is now done in the branch https://github.com/krosenvold/commons-compress
As refactorings come it doesn't "feel" too good (extracting all the methods to create zip headers to a different class would probably be a refactoring with a lot better *feeling* to it....). This may be due to the overall largeness of the file in question, it may also be because of the "leaks" between ZipArchiveOutputStream (fields raf & out) and StreamCompressor. It removes the duplication and is probably better since it clearly decouples one aspect of the algorithm from the rest. I just wish I could get it even better .... Feedback welcome :) Kristian 2014-12-26 18:54 GMT+01:00 Stefan Bodewig <bode...@apache.org>: > On 2014-12-23, Stefan Bodewig wrote: > >> Your commit message calls out writeOut as a particilar problem. >> Fortunately this is one is final, so we don't have to retain the effect >> of subclasses overriding it. Wouldn't it be possible to have writeOut >> call the StreamCompressor's writeOut method so it still worked as >> before? > > I see you've already started to implement that in your github fork. :-) > >> [As an aside I'd prefer the StreamCompressor being passed into the >> stream so we don't need subclasses just to replace the compressor.] > > At least for the ScatterZipOutputStream I've started to experiment a > little: > <https://github.com/bodewig/commons-compress/compare/scatter-backing-store> > > As for > >> One problem of the zip package is that it doesn't support all the >> other compression methods possible for ZIPs, this might be a possible >> extension point. > > I'd like to see where you are going to take the compressor before I try > to dive in. Do I need to look at your plexus-archiver fork? > > Stefan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org