#59 Make compressors/decompressors instantiable

Version 2.0
closed
9
2012-11-01
2012-10-27
Andrei Kapustin
No

Currently for each compression algorithm there exists exactly one Compressor and one Decompressor. This will not do for multi-threaded code, where several threads may want to e.g. compress in parallel.

To solve this, the "getCompressor()" and "getDecompressor()" methods of CompressionAlgorithm shall become "createCompressor()" and "createDecompressor()" respectively, each returning a new instance on each call. Clients (e.g. CompressOutputStream) shall be updated accordingly, as well as unit tests.

Discussion

    • milestone: --> Version 2.0
     
    • priority: 7 --> 9
     
    • status: open --> closed