std.compress

Dmitry Olshansky dmitry.olsh at gmail.com
Wed Jun 5 10:46:03 PDT 2013


05-Jun-2013 16:16, Tiago Martinez пишет:
> On Tuesday, 4 June 2013 at 03:44:05 UTC, 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
>>
>> Comments welcome.
>
> I may have misunderstood something, but the code does not
> implement LZW (a variant of LZ78), but a variant of LZ77 (i.e.
> deflate/ZIP).

+1
I thought to chime in with this too, keywords are:
sliding window ===> LZ77
dictionary ===> LZW

> See https://en.wikipedia.org/wiki/LZ77_and_LZ78


-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list