std.compress

Walter Bright newshound2 at digitalmars.com
Tue Jun 4 10:51:17 PDT 2013


On 6/4/2013 9:34 AM, David wrote:
> Am 04.06.2013 18:09, schrieb Walter Bright:
>> On 6/4/2013 6:34 AM, Jacob Carlborg wrote:
>>> I'm wondering if (un)compress can take the compressing algorithm as a
>>> template
>>> parameter. Does that make sense?
>>>
>>> Something like:
>>>
>>> auto result = data.compress!(LZW);
>>>
>>> Then we could pass different compressing algorithms to the compress
>>> function.
>>
>> I don't see the point. Furthermore, it requires that the compress
>> template know about all the compression algorithms available, which
>> limits future expansion.
>>
>
> No the compression type only has to provide a certain api.
>

Again, I'm not seeing the added value with this.


More information about the Digitalmars-d mailing list