A Place for C Sharpers/.Netters

I Will do coding till last moment of life-Kiran Patil

UnSupported Compression method

Posted by kiranpatils on January 6, 2010

Challenge:

I was writing a piece of code which generates zip file from the files read from Database and send  as an attachment mail to user. I used SharpZiLib library for that. And i completed writing my logic and mail goes fine to user’s mail box. So, far so good :) . But when user tries to extract the attached zip file using 7Zip it shown following error and was working fine with winzip:

UnSupported Compression method for FILENAME.FILEXTENSION ERROR

Solution:

Then i just started going through the code and i just commented following line of cod and it worked!

//Crc32 crc = new Crc32();
//crc.Reset();
//crc.Update(buffer);
//zipEntry.Crc = crc.Value;

Hope this helps you to resolve your problem and say happy zipping!

One Response to “UnSupported Compression method”

  1. Me said

    Thanx for posting this, it solved my problem too!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 102 other followers