K
kk2000
Unregistered / Unconfirmed
GUEST, unregistred user!
//各位大侠,请问一下d6 那个解压缩的控件怎么死在下面有 *****
procedure DeCompressStream(InStream: TStream; OutStream: TStream);
var
zlibDeCompressor: TDeCompressionStream;
fBuffer: array[0..16383] of byte;
fBufLen: integer;
begin
zlibDeCompressor := TDeCompressionStream.create(InStream);
try
zlibDeCompressor.Position := 0;
OutStream.Size := 0;
fBufLen := zlibDeCompressor.Read(fBuffer, SizeOf(fBuffer)); //有问题吗?******* 死在这里了.
while fBufLen > 0 do
begin
OutStream.Write(fBuffer, fBufLen);
fBufLen := zlibDeCompressor.Read(fBuffer, SizeOf(fBuffer));
end;
OutStream.Position := 0;
finally
FreeAndNil(zlibDeCompressor);
end;
end;
procedure DeCompressStream(InStream: TStream; OutStream: TStream);
var
zlibDeCompressor: TDeCompressionStream;
fBuffer: array[0..16383] of byte;
fBufLen: integer;
begin
zlibDeCompressor := TDeCompressionStream.create(InStream);
try
zlibDeCompressor.Position := 0;
OutStream.Size := 0;
fBufLen := zlibDeCompressor.Read(fBuffer, SizeOf(fBuffer)); //有问题吗?******* 死在这里了.
while fBufLen > 0 do
begin
OutStream.Write(fBuffer, fBufLen);
fBufLen := zlibDeCompressor.Read(fBuffer, SizeOf(fBuffer));
end;
OutStream.Position := 0;
finally
FreeAndNil(zlibDeCompressor);
end;
end;