UnCompress Buffer

delphi package - madRes, madTools, madStrings, ...

UnCompress Buffer

Postby Armagedon » Tue Jan 26, 2010 6:27 am

hi
how i can uncompress , Compressed file from buff to mem and extract to harddisk?

i need an example
thanks ;
Armagedon
 
Posts: 14
Joined: Tue May 27, 2008 4:30 am

Postby madshi » Sat Jan 30, 2010 1:06 pm

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;
madshi
Site Admin
 
Posts: 9431
Joined: Sun Mar 21, 2004 5:25 pm


Return to madBasic

Who is online

Users browsing this forum: No registered users and 1 guest

cron