Lines Matching refs:this

11  * condition to leave the original address (Yamasoft, http://www.yamasoft.com) and this header.
42 $this->MAX_LZW_BITS = 12;
44 unset($this->Next);
45 unset($this->Vals);
46 unset($this->Stack);
47 unset($this->Buf);
49 $this->Next = range(0, (1 << $this->MAX_LZW_BITS) - 1);
50 $this->Vals = range(0, (1 << $this->MAX_LZW_BITS) - 1);
51 $this->Stack = range(0, (1 << ($this->MAX_LZW_BITS + 1)) - 1);
52 $this->Buf = range(0, 279);
62 $this->LZWCommandInit($data, $dp);
64 while (($iIndex = $this->LZWCommand($data, $dp)) >= 0) {
79 $this->SetCodeSize = ord($data[0]);
82 $this->CodeSize = $this->SetCodeSize + 1;
83 $this->ClearCode = 1 << $this->SetCodeSize;
84 $this->EndCode = $this->ClearCode + 1;
85 $this->MaxCode = $this->ClearCode + 2;
86 $this->MaxCodeSize = $this->ClearCode << 1;
88 $this->GetCodeInit($data, $dp);
90 $this->Fresh = 1;
91 for ($i = 0; $i < $this->ClearCode; $i++) {
92 $this->Next[$i] = 0;
93 $this->Vals[$i] = $i;
96 for (; $i < (1 << $this->MAX_LZW_BITS); $i++) {
97 $this->Next[$i] = 0;
98 $this->Vals[$i] = 0;
101 $this->sp = 0;
107 if ($this->Fresh) {
108 $this->Fresh = 0;
110 $this->FirstCode = $this->GetCode($data, $dp);
111 $this->OldCode = $this->FirstCode;
112 } while ($this->FirstCode == $this->ClearCode);
114 return $this->FirstCode;
117 if ($this->sp > 0) {
118 $this->sp--;
119 return $this->Stack[$this->sp];
122 while (($Code = $this->GetCode($data, $dp)) >= 0) {
123 if ($Code == $this->ClearCode) {
124 for ($i = 0; $i < $this->ClearCode; $i++) {
125 $this->Next[$i] = 0;
126 $this->Vals[$i] = $i;
129 for (; $i < (1 << $this->MAX_LZW_BITS); $i++) {
130 $this->Next[$i] = 0;
131 $this->Vals[$i] = 0;
134 $this->CodeSize = $this->SetCodeSize + 1;
135 $this->MaxCodeSize = $this->ClearCode << 1;
136 $this->MaxCode = $this->ClearCode + 2;
137 $this->sp = 0;
138 $this->FirstCode = $this->GetCode($data, $dp);
139 $this->OldCode = $this->FirstCode;
141 return $this->FirstCode;
144 if ($Code == $this->EndCode) {
149 if ($Code >= $this->MaxCode) {
150 $this->Stack[$this->sp++] = $this->FirstCode;
151 $Code = $this->OldCode;
154 while ($Code >= $this->ClearCode) {
155 $this->Stack[$this->sp++] = $this->Vals[$Code];
157 if ($Code == $this->Next[$Code]) { // Circular table entry, big GIF Error!
161 $Code = $this->Next[$Code];
164 $this->FirstCode = $this->Vals[$Code];
165 $this->Stack[$this->sp++] = $this->FirstCode;
167 if (($Code = $this->MaxCode) < (1 << $this->MAX_LZW_BITS)) {
168 $this->Next[$Code] = $this->OldCode;
169 $this->Vals[$Code] = $this->FirstCode;
170 $this->MaxCode++;
172 if (($this->MaxCode >= $this->MaxCodeSize) && ($this->MaxCodeSize < (1 << $this->MAX_LZW_BITS))) {
173 $this->MaxCodeSize *= 2;
174 $this->CodeSize++;
178 $this->OldCode = $InCode;
179 if ($this->sp > 0) {
180 $this->sp--;
181 return $this->Stack[$this->sp];
190 $this->CurBit = 0;
191 $this->LastBit = 0;
192 $this->Done = 0;
193 $this->LastByte = 2;
199 if (($this->CurBit + $this->CodeSize) >= $this->LastBit) {
200 if ($this->Done) {
201 if ($this->CurBit >= $this->LastBit) {
208 $this->Buf[0] = $this->Buf[$this->LastByte - 2];
209 $this->Buf[1] = $this->Buf[$this->LastByte - 1];
216 $this->Buf[2 + $i] = ord($data[$dp + $i]);
220 $this->Done = 1;
223 $this->LastByte = 2 + $Count;
224 $this->CurBit = ($this->CurBit - $this->LastBit) + 16;
225 $this->LastBit = (2 + $Count) << 3;
229 for ($i = $this->CurBit, $j = 0; $j < $this->CodeSize; $i++, $j++) {
230 $iRet |= (($this->Buf[intval($i / 8)] & (1 << ($i % 8))) != 0) << $j;
233 $this->CurBit += $this->CodeSize;