libredwg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libredwg] LZ77 Compression


From: Dave Coventry
Subject: Re: [libredwg] LZ77 Compression
Date: Thu, 11 Oct 2012 10:26:14 +0200

Hi Till,

Just to clarify what's confusing me:

Here is case 15: (line 244, decode_r2007.c)

    case 15:
      copy_2(13);
      copy_4(9);
      copy_8(1);
      copy_1(0);
      break;

If I start out with the following src array:
src=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]
and an empty dst array, the dst array gets populated thus:


copy_2(13);
dst=[14,13]

copy_4(9);
dst=[14,13,9,10,11,12]

copy_8(1);
dst=[14,13,9,10,11,12,1,2,3,4,5,6,7,8]

copy_1(0);
dst=[14,13,9,10,11,12,1,2,3,4,5,6,7,8,0]

Are you sure that's how it works?

Or have I misread the C++ code?

Many thanks,

Dave Coventry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]