Andrei Kapustin
-
2012-11-01
- milestone: --> Version 2.0
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.