Spida_81
asked on
Generate gzipped Stream of Memorystream
Short:
I'd like to generate a stream (memorystream) containing a gzipped file of a cleartext stream (memorystream, too).
What I did:
I have been using Delphizlib http://gewis.win.tue.nl/info/delphizlib/ for files, but it seems that this is unable to work with streams.
What I want:
I am generating a stream that contains a file (like from memorystream.loadfromfile) and want to compress it. The resulting stream should contain the original file in gzipped form, that I could open as file.gz if I did memorystream.savetofile. However I DON'T want to save it to a file, because I can't guarantee that I have the right to write to any Disk.
Please help.
I'd like to generate a stream (memorystream) containing a gzipped file of a cleartext stream (memorystream, too).
What I did:
I have been using Delphizlib http://gewis.win.tue.nl/info/delphizlib/ for files, but it seems that this is unable to work with streams.
What I want:
I am generating a stream that contains a file (like from memorystream.loadfromfile)
Please help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
My code uses Delphi's ZLib.
If you are using delphi 6 or 7 then you should be having it
I'm not sure whether this is what you need or not.
Please try the code and let me know.
If you are using delphi 6 or 7 then you should be having it
I'm not sure whether this is what you need or not.
Please try the code and let me know.
ASKER
If I can find the library (where?) and the output of CompressStream() is, when saved to a file with tostream.savetofile, readable with winzip, then it is what I need.
Spida_81:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
ASKER
Does it conflict with delphizlib?
Is it possible to do this with delphizlib, too?