D
devilsniffer
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure LHACompress(InStr, OutStr: TStream);<br>begin<br> InitMemory;<br> try<br> InFile := InStr;<br> OutFile := OutStr;<br> OrigSize := InFile.Size - InFile.Position;<br> CompSize := 0;<br> OutFile.Write(OrigSize,4);<br> Encode;<br> finally<br> FreeMemory;<br> end;<br>end;<br><br>procedure LHAExpand(InStr, OutStr: TStream);<br>begin<br> try<br> InitMemory;<br> InFile := InStr;<br> OutFile := OutStr;<br> CompSize := InFile.Size - InFile.Position;<br> InFile.Read(OrigSize,4);<br> Decode;<br> finally<br> FreeMemory;<br> end;<br>end;<br><br>单元里面上面两个过程分别是调用压缩和解压缩部分,但是是压缩和解压缩输出的是流,如何修改一下,让它输出的是文件形式?