tags:

views:

296

answers:

1
Compress(TInt aCompressionMethod,const TDesC8 data)
{
  TInt compressionMethod = 0;
  if(aCompressionMethod == 0)
    compressionMethod = Z_DEFAULT_COMPRESSION;

  iCompressor =CEZCompressor::NewLC(*this,Z_DEFAULT_COMPRESSION);

  TRAPD(err, iCompressor->CompressL(cipher,text));
}

i am using compression using gzip method in symbian in client side and on server side server is in java

problem is that on server side in java gZip format is not matched exception is thrown

i want to know the method i am using to compress string is correct or wrong

or whether i have to made change or server side has to change

A: 

CEZCompressor will just give you the deflate-compressed data. It does not contain any gzip-specific header information. If your server-side java implementation needs to see that information, use the CEZGZipToFile class.

There's a nice example at Forum Nokia wiki.

Hope this helps. If not, please add details to your question. Currently it is a little bit on the vague side.

laalto
hi,i am using this class to compress string and on server i have to decompress that string not stringwould u plz suggest correct way to compress string not file