|
@@ -83,10 +83,10 @@ begin
|
|
b := s.bitb;
|
|
b := s.bitb;
|
|
k := s.bitk;
|
|
k := s.bitk;
|
|
q := s.write;
|
|
q := s.write;
|
|
- if ptrint(q) < ptrint(s.read) then
|
|
|
|
- m := cardinal(ptrint(s.read)-ptrint(q)-1)
|
|
|
|
|
|
+ if ptruint(q) < ptruint(s.read) then
|
|
|
|
+ m := cardinal(ptruint(s.read)-ptruint(q)-1)
|
|
else
|
|
else
|
|
- m := cardinal(ptrint(s.zend)-ptrint(q));
|
|
|
|
|
|
+ m := cardinal(ptruint(s.zend)-ptruint(q));
|
|
|
|
|
|
{ process input and output based on current state }
|
|
{ process input and output based on current state }
|
|
while True do
|
|
while True do
|
|
@@ -101,7 +101,7 @@ begin
|
|
s.bitb := b;
|
|
s.bitb := b;
|
|
s.bitk := k;
|
|
s.bitk := k;
|
|
z.avail_in := n;
|
|
z.avail_in := n;
|
|
- Inc(z.total_in, ptrint(p)-ptrint(z.next_in));
|
|
|
|
|
|
+ Inc(z.total_in, ptruint(p)-ptruint(z.next_in));
|
|
z.next_in := p;
|
|
z.next_in := p;
|
|
s.write := q;
|
|
s.write := q;
|
|
|
|
|
|
@@ -112,10 +112,10 @@ begin
|
|
b := s.bitb;
|
|
b := s.bitb;
|
|
k := s.bitk;
|
|
k := s.bitk;
|
|
q := s.write;
|
|
q := s.write;
|
|
- if ptrint(q) < ptrint(s.read) then
|
|
|
|
- m := cardinal(ptrint(s.read)-ptrint(q)-1)
|
|
|
|
|
|
+ if ptruint(q) < ptruint(s.read) then
|
|
|
|
+ m := cardinal(ptruint(s.read)-ptruint(q)-1)
|
|
else
|
|
else
|
|
- m := cardinal(ptrint(s.zend)-ptrint(q));
|
|
|
|
|
|
+ m := cardinal(ptruint(s.zend)-ptruint(q));
|
|
|
|
|
|
if (r <> Z_OK) then
|
|
if (r <> Z_OK) then
|
|
begin
|
|
begin
|
|
@@ -146,7 +146,7 @@ begin
|
|
s.bitb := b;
|
|
s.bitb := b;
|
|
s.bitk := k;
|
|
s.bitk := k;
|
|
z.avail_in := n;
|
|
z.avail_in := n;
|
|
- Inc(z.total_in, ptrint(p)-ptrint(z.next_in));
|
|
|
|
|
|
+ Inc(z.total_in, ptruint(p)-ptruint(z.next_in));
|
|
z.next_in := p;
|
|
z.next_in := p;
|
|
s.write := q;
|
|
s.write := q;
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
@@ -204,7 +204,7 @@ begin
|
|
s.bitb := b;
|
|
s.bitb := b;
|
|
s.bitk := k;
|
|
s.bitk := k;
|
|
z.avail_in := n;
|
|
z.avail_in := n;
|
|
- Inc(z.total_in, ptrint(p)-ptrint(z.next_in));
|
|
|
|
|
|
+ Inc(z.total_in, ptruint(p)-ptruint(z.next_in));
|
|
z.next_in := p;
|
|
z.next_in := p;
|
|
s.write := q;
|
|
s.write := q;
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
@@ -225,7 +225,7 @@ begin
|
|
s.bitb := b;
|
|
s.bitb := b;
|
|
s.bitk := k;
|
|
s.bitk := k;
|
|
z.avail_in := n;
|
|
z.avail_in := n;
|
|
- Inc(z.total_in, ptrint(p)-ptrint(z.next_in));
|
|
|
|
|
|
+ Inc(z.total_in, ptruint(p)-ptruint(z.next_in));
|
|
z.next_in := p;
|
|
z.next_in := p;
|
|
s.write := q;
|
|
s.write := q;
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
@@ -264,7 +264,7 @@ begin
|
|
s.bitb := b;
|
|
s.bitb := b;
|
|
s.bitk := k;
|
|
s.bitk := k;
|
|
z.avail_in := n;
|
|
z.avail_in := n;
|
|
- Inc(z.total_in, ptrint(p)-ptrint(z.next_in));
|
|
|
|
|
|
+ Inc(z.total_in, ptruint(p)-ptruint(z.next_in));
|
|
z.next_in := p;
|
|
z.next_in := p;
|
|
s.write := q;
|
|
s.write := q;
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
@@ -301,7 +301,7 @@ begin
|
|
s.bitb := b;
|
|
s.bitb := b;
|
|
s.bitk := k;
|
|
s.bitk := k;
|
|
z.avail_in := n;
|
|
z.avail_in := n;
|
|
- Inc(z.total_in, ptrint(p)-ptrint(z.next_in));
|
|
|
|
|
|
+ Inc(z.total_in, ptruint(p)-ptruint(z.next_in));
|
|
z.next_in := p;
|
|
z.next_in := p;
|
|
s.write := q;
|
|
s.write := q;
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
@@ -322,7 +322,7 @@ begin
|
|
s.bitb := b;
|
|
s.bitb := b;
|
|
s.bitk := k;
|
|
s.bitk := k;
|
|
z.avail_in := n;
|
|
z.avail_in := n;
|
|
- Inc(z.total_in, ptrint(p)-ptrint(z.next_in));
|
|
|
|
|
|
+ Inc(z.total_in, ptruint(p)-ptruint(z.next_in));
|
|
z.next_in := p;
|
|
z.next_in := p;
|
|
s.write := q;
|
|
s.write := q;
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
@@ -347,10 +347,10 @@ begin
|
|
begin
|
|
begin
|
|
f := q;
|
|
f := q;
|
|
dec(f, c^.sub.copy.dist);
|
|
dec(f, c^.sub.copy.dist);
|
|
- if (cardinal(ptrint(q) - ptrint(s.window)) < c^.sub.copy.dist) then
|
|
|
|
|
|
+ if (cardinal(ptruint(q) - ptruint(s.window)) < c^.sub.copy.dist) then
|
|
begin
|
|
begin
|
|
f := s.zend;
|
|
f := s.zend;
|
|
- dec(f, c^.sub.copy.dist - cardinal(ptrint(q) - ptrint(s.window)));
|
|
|
|
|
|
+ dec(f, c^.sub.copy.dist - cardinal(ptruint(q) - ptruint(s.window)));
|
|
end;
|
|
end;
|
|
|
|
|
|
while (c^.len <> 0) do
|
|
while (c^.len <> 0) do
|
|
@@ -362,10 +362,10 @@ begin
|
|
if (q = s.zend) and (s.read <> s.window) then
|
|
if (q = s.zend) and (s.read <> s.window) then
|
|
begin
|
|
begin
|
|
q := s.window;
|
|
q := s.window;
|
|
- if ptrint(q) < ptrint(s.read) then
|
|
|
|
- m := cardinal(ptrint(s.read)-ptrint(q)-1)
|
|
|
|
|
|
+ if ptruint(q) < ptruint(s.read) then
|
|
|
|
+ m := cardinal(ptruint(s.read)-ptruint(q)-1)
|
|
else
|
|
else
|
|
- m := cardinal(ptrint(s.zend)-ptrint(q));
|
|
|
|
|
|
+ m := cardinal(ptruint(s.zend)-ptruint(q));
|
|
end;
|
|
end;
|
|
|
|
|
|
if (m = 0) then
|
|
if (m = 0) then
|
|
@@ -374,19 +374,19 @@ begin
|
|
s.write := q;
|
|
s.write := q;
|
|
r := inflate_flush(s,z,r);
|
|
r := inflate_flush(s,z,r);
|
|
q := s.write;
|
|
q := s.write;
|
|
- if ptrint(q) < ptrint(s.read) then
|
|
|
|
- m := cardinal(ptrint(s.read)-ptrint(q)-1)
|
|
|
|
|
|
+ if ptruint(q) < ptruint(s.read) then
|
|
|
|
+ m := cardinal(ptruint(s.read)-ptruint(q)-1)
|
|
else
|
|
else
|
|
- m := cardinal(ptrint(s.zend)-ptrint(q));
|
|
|
|
|
|
+ m := cardinal(ptruint(s.zend)-ptruint(q));
|
|
|
|
|
|
{WRAP}
|
|
{WRAP}
|
|
if (q = s.zend) and (s.read <> s.window) then
|
|
if (q = s.zend) and (s.read <> s.window) then
|
|
begin
|
|
begin
|
|
q := s.window;
|
|
q := s.window;
|
|
- if ptrint(q) < ptrint(s.read) then
|
|
|
|
- m := cardinal(ptrint(s.read)-ptrint(q)-1)
|
|
|
|
|
|
+ if ptruint(q) < ptruint(s.read) then
|
|
|
|
+ m := cardinal(ptruint(s.read)-ptruint(q)-1)
|
|
else
|
|
else
|
|
- m := cardinal(ptrint(s.zend)-ptrint(q));
|
|
|
|
|
|
+ m := cardinal(ptruint(s.zend)-ptruint(q));
|
|
end;
|
|
end;
|
|
|
|
|
|
if (m = 0) then
|
|
if (m = 0) then
|
|
@@ -395,7 +395,7 @@ begin
|
|
s.bitb := b;
|
|
s.bitb := b;
|
|
s.bitk := k;
|
|
s.bitk := k;
|
|
z.avail_in := n;
|
|
z.avail_in := n;
|
|
- Inc(z.total_in, ptrint(p)-ptrint(z.next_in));
|
|
|
|
|
|
+ Inc(z.total_in, ptruint(p)-ptruint(z.next_in));
|
|
z.next_in := p;
|
|
z.next_in := p;
|
|
s.write := q;
|
|
s.write := q;
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
@@ -427,10 +427,10 @@ begin
|
|
if (q = s.zend) and (s.read <> s.window) then
|
|
if (q = s.zend) and (s.read <> s.window) then
|
|
begin
|
|
begin
|
|
q := s.window;
|
|
q := s.window;
|
|
- if ptrint(q) < ptrint(s.read) then
|
|
|
|
- m := cardinal(ptrint(s.read)-ptrint(q)-1)
|
|
|
|
|
|
+ if ptruint(q) < ptruint(s.read) then
|
|
|
|
+ m := cardinal(ptruint(s.read)-ptruint(q)-1)
|
|
else
|
|
else
|
|
- m := cardinal(ptrint(s.zend)-ptrint(q));
|
|
|
|
|
|
+ m := cardinal(ptruint(s.zend)-ptruint(q));
|
|
end;
|
|
end;
|
|
|
|
|
|
if (m = 0) then
|
|
if (m = 0) then
|
|
@@ -439,19 +439,19 @@ begin
|
|
s.write := q;
|
|
s.write := q;
|
|
r := inflate_flush(s,z,r);
|
|
r := inflate_flush(s,z,r);
|
|
q := s.write;
|
|
q := s.write;
|
|
- if ptrint(q) < ptrint(s.read) then
|
|
|
|
- m := cardinal(ptrint(s.read)-ptrint(q)-1)
|
|
|
|
|
|
+ if ptruint(q) < ptruint(s.read) then
|
|
|
|
+ m := cardinal(ptruint(s.read)-ptruint(q)-1)
|
|
else
|
|
else
|
|
- m := cardinal(ptrint(s.zend)-ptrint(q));
|
|
|
|
|
|
+ m := cardinal(ptruint(s.zend)-ptruint(q));
|
|
|
|
|
|
{WRAP}
|
|
{WRAP}
|
|
if (q = s.zend) and (s.read <> s.window) then
|
|
if (q = s.zend) and (s.read <> s.window) then
|
|
begin
|
|
begin
|
|
q := s.window;
|
|
q := s.window;
|
|
- if ptrint(q) < ptrint(s.read) then
|
|
|
|
- m := cardinal(ptrint(s.read)-ptrint(q)-1)
|
|
|
|
|
|
+ if ptruint(q) < ptruint(s.read) then
|
|
|
|
+ m := cardinal(ptruint(s.read)-ptruint(q)-1)
|
|
else
|
|
else
|
|
- m := cardinal(ptrint(s.zend)-ptrint(q));
|
|
|
|
|
|
+ m := cardinal(ptruint(s.zend)-ptruint(q));
|
|
end;
|
|
end;
|
|
|
|
|
|
if (m = 0) then
|
|
if (m = 0) then
|
|
@@ -460,7 +460,7 @@ begin
|
|
s.bitb := b;
|
|
s.bitb := b;
|
|
s.bitk := k;
|
|
s.bitk := k;
|
|
z.avail_in := n;
|
|
z.avail_in := n;
|
|
- Inc(z.total_in, ptrint(p)-ptrint(z.next_in));
|
|
|
|
|
|
+ Inc(z.total_in, ptruint(p)-ptruint(z.next_in));
|
|
z.next_in := p;
|
|
z.next_in := p;
|
|
s.write := q;
|
|
s.write := q;
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
@@ -495,10 +495,10 @@ begin
|
|
s.write := q;
|
|
s.write := q;
|
|
r := inflate_flush(s,z,r);
|
|
r := inflate_flush(s,z,r);
|
|
q := s.write;
|
|
q := s.write;
|
|
- if ptrint(q) < ptrint(s.read) then
|
|
|
|
- m := cardinal(ptrint(s.read)-ptrint(q)-1)
|
|
|
|
|
|
+ if ptruint(q) < ptruint(s.read) then
|
|
|
|
+ m := cardinal(ptruint(s.read)-ptruint(q)-1)
|
|
else
|
|
else
|
|
- m := cardinal(ptrint(s.zend)-ptrint(q));
|
|
|
|
|
|
+ m := cardinal(ptruint(s.zend)-ptruint(q));
|
|
|
|
|
|
if (s.read <> s.write) then
|
|
if (s.read <> s.write) then
|
|
begin
|
|
begin
|
|
@@ -506,7 +506,7 @@ begin
|
|
s.bitb := b;
|
|
s.bitb := b;
|
|
s.bitk := k;
|
|
s.bitk := k;
|
|
z.avail_in := n;
|
|
z.avail_in := n;
|
|
- Inc(z.total_in, ptrint(p)-ptrint(z.next_in));
|
|
|
|
|
|
+ Inc(z.total_in, ptruint(p)-ptruint(z.next_in));
|
|
z.next_in := p;
|
|
z.next_in := p;
|
|
s.write := q;
|
|
s.write := q;
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
@@ -523,7 +523,7 @@ begin
|
|
s.bitb := b;
|
|
s.bitb := b;
|
|
s.bitk := k;
|
|
s.bitk := k;
|
|
z.avail_in := n;
|
|
z.avail_in := n;
|
|
- Inc(z.total_in, ptrint(p)-ptrint(z.next_in));
|
|
|
|
|
|
+ Inc(z.total_in, ptruint(p)-ptruint(z.next_in));
|
|
z.next_in := p;
|
|
z.next_in := p;
|
|
s.write := q;
|
|
s.write := q;
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
@@ -536,7 +536,7 @@ begin
|
|
s.bitb := b;
|
|
s.bitb := b;
|
|
s.bitk := k;
|
|
s.bitk := k;
|
|
z.avail_in := n;
|
|
z.avail_in := n;
|
|
- Inc(z.total_in, ptrint(p)-ptrint(z.next_in));
|
|
|
|
|
|
+ Inc(z.total_in, ptruint(p)-ptruint(z.next_in));
|
|
z.next_in := p;
|
|
z.next_in := p;
|
|
s.write := q;
|
|
s.write := q;
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
@@ -549,7 +549,7 @@ begin
|
|
s.bitb := b;
|
|
s.bitb := b;
|
|
s.bitk := k;
|
|
s.bitk := k;
|
|
z.avail_in := n;
|
|
z.avail_in := n;
|
|
- Inc(z.total_in, ptrint(p)-ptrint(z.next_in));
|
|
|
|
|
|
+ Inc(z.total_in, ptruint(p)-ptruint(z.next_in));
|
|
z.next_in := p;
|
|
z.next_in := p;
|
|
s.write := q;
|
|
s.write := q;
|
|
inflate_codes := inflate_flush(s,z,r);
|
|
inflate_codes := inflate_flush(s,z,r);
|