On 2013-06-04 05:44, Walter Bright wrote:
https://github.com/WalterBright/phobos/blob/std_compress/std/compress.d

I wrote this to add components to compress and expand ranges.

Highlights:

1. doesn't do any memory allocation
2. can handle arbitrarily large sets of data
3. it's lazy
4. takes an InputRange, and outputs an InputRange

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.

--
/Jacob Carlborg

Reply via email to