Hi
I'm trying to compress some data I'm fetching from a database on the palm.
I'm reading one column at a time and trying to compress it with deflate.
The data I'm reading is written into a memory heap before it gets compressed and
written into another heap before I write it with FileWrite(...) into a stream that I'm
uploading to the server.
Everything seems to be working fine, but after the compression nothing seems to be
done, the oputput stays the same, as if I weren't compressing at all.
I've read that maybe I should use deflateSetDictionary() but I can't find were to
initialise the dictionary or which one to use.
Maybe I'm doing somthing terribly wrong, or I'm missing some importend point. I would
be very happy if someone could show me were I'm going wrong or say me another way to
solve this problem.
with regards
Christian Lindemeier
/********initialising*********/
MemSet (&strm, sizeof(strm), 0);
strm.zalloc = (alloc_func)0;
strm.zfree = (free_func)0;
strm.opaque = (voidpf)0;
ZLSetup;
deflateInit (&strm, 8) ;
/********compressing********/
availOut = sizeof(rTempB);
(char *)strm.next_in=&rbuffer[0];
(char *)strm.next_out=&rTempB[0];
do{
strm.avail_out=availOut;
(char *)strm.next_in=&rbuffer[0];
(char *)strm.next_out=&rTempB[0];
deflate (&strm, 8);
}while(strm.avail_out == 0);
/*******freeing memory*************/
deflateEnd (&strm);;/*end of compression*/
ZLTeardown;
______________________________________________________________________
Extra-Konto: 2,50 %* Zinsen p. a. ab dem ersten Euro! Nur hier mit 25
Euro-Tankgutschein & ExtraPr�mie! https://extrakonto.web.de/?mc=021110
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/