Why do we have to put everything in string? why Zip string: 'hello' Zip bzip string: 'hello' Zip gzip string: 'hello' would not be more modular? Zip could be a factory and have subclasses. This is not because can extend classes that we should think about nicer way. I like for example the DateFormatter strategy related to Date from other languages because I can specify the way I want it. Stef Le 25/2/15 16:52, Juraj Kubelka a écrit :
25. 2. 2015 v 12:28, Sven Van Caekenberghe <sven@stfx.eu>:
This seems related to adding 'easy of use' methods to String.
There are many different compression schemes (zip, bzip, bzip2, gzip, ...), are we going to add them all ?
How much do we want to couple different parts of the system ? I prefer to couple the compression schemes with String and ByteArray. Methods like #zipped, #unzipped are not that simple and it is not well apparent how to use that compression scheme.
Cheers, Juraj
On 25 Feb 2015, at 16:23, Juraj Kubelka <juraj.kubelka@gmail.com> wrote:
Can I add ByteArray>>#zipped and #unzipped methods the way it is for String? I want to compress bytes before sending through internet, for example.
Do you agree? Thanks, Juraj