Raptisoft
08-09-2004, 04:04 AM
Hi all,
I have a question and am looking for advice. I'm looking for a way to apply zip (or preferably, LZMA) compression to a block of memory. That is to say, I do NOT want to produce a file, I want essentially say:
theMemory=new char[10000];
//
// Fill 'theMemory' with data
//
char *newMemory=Compress(theMemory);
and then do:
char *restoreMemory=UnCompress(newMemory);
* * *
As far as I know, none of the existing compression SDKs will compress a hunk of memory-- they're all file writes (am I correct? I haven't researched this extensively). I know I'll need to write up my own stuff, but I wondered if anyone has a good link to a nice hold-my-hand tutorial on how to do this shtuff?
Thanks in advance!
I have a question and am looking for advice. I'm looking for a way to apply zip (or preferably, LZMA) compression to a block of memory. That is to say, I do NOT want to produce a file, I want essentially say:
theMemory=new char[10000];
//
// Fill 'theMemory' with data
//
char *newMemory=Compress(theMemory);
and then do:
char *restoreMemory=UnCompress(newMemory);
* * *
As far as I know, none of the existing compression SDKs will compress a hunk of memory-- they're all file writes (am I correct? I haven't researched this extensively). I know I'll need to write up my own stuff, but I wondered if anyone has a good link to a nice hold-my-hand tutorial on how to do this shtuff?
Thanks in advance!