Hi
I have some delphi code that did this needs to be re coded in c#:
procedure TDocSearchX.Decompress;
var
BlobStream:TBlobStream;
DecompressionStream:TDecompressionStream;
FileStream:TFileStream;
Buffer:array[0..2047] of byte;
count:integer;
begin
BlobStream:=TBlobStream.Create(DocQueryDATA,bmRead);
DecompressionStream:=TDecompressionStream.Create(BlobStream);
FileStream:=TFileStream.Create(FDocFile,fmCreate);
while True do
begin
Count := DecompressionStream.Read(Buffer, 2048);
if Count <> 0 then FileStream.Write(Buffer, Count) else Break;
end;
Blobstream.Free;
DecompressionStream.Free;
FileStream.Free;
end;
The contractor that wrote is leaving and I need to decompress the image (that is currently stored in the database). I have been able to extract the image to a file but have no idea how to decompress it using c# ??
Please help.
-Tim