Hi all,
I am trying to compress all files from folder into oe xml file and retrive them back.
I did it successfully with English OS but i got exception "Expected end of stream not found" when irun same code on Japanese and Chinese OS.
The code is as follows :
byte[] compressedData = Encoding.Default.GetBytes(strData);
byte[] decompressedData;
try
{
decompressedData = QuickCompression.Decompress(compressedData);
}
catch(Exception e)
{
sw.WriteLine(e.Message);
sw.Close();
RevertImportOperation();
return 2;
}
some times if it do not give any exception but I can not retrieve Chinese(chn) and Japanese(jpn) char. Instead of the I get ????? characters. I there is some problem with Unicode string. we are passing byte array to the method and some times jpn and chn char are 2 byes. This might be causing problem.
I tried using sample code given in documentation which uses MemoryStream and CompressedStream for compression and decompression but I got another exception.
Can any one suggest me what i need to do to support Unicode compression and decompression? Any other method from zip lib?
Thanks and Regards,
Trupti Somwanshi
Software Engineer | Persistent Systems Limited
trupti_somwanshi@persistent.co.in
Persistent Systems - Innovation in software product design, development and delivery - www.persistentsys.com