Page 1 of 1

UnCompress Buffer

Posted: Tue Jan 26, 2010 6:27 am
by Armagedon
hi
how i can uncompress , Compressed file from buff to mem and extract to harddisk?

i need an example
thanks ;

Posted: Sat Jan 30, 2010 1:06 pm
by madshi
Something like this (not tested):

Code: Select all

procedure Whatever(compressedDataStr: AnsiString);
var uncompr : AnsiString;
begin
  uncompr := Uncompress(compressedDataStr);
  with TFileStream.Create(...) do begin
    WriteBuffer(PAnsiChar(uncompr)^, Length(uncompr));
    Free;
  end;
end;