"On this special day, celebrate life. Take a break from your busy schedule. Let your hair down, have fun and do what your heart says. because today is your day. Have a great Women’s Day"
Explore My Other Channel for More Cool and Valuable Insights
π Youtube Learn Tech Tipsπ Tiktok
π Facebook:This topic today is focus to how to zip any file with Ionic.Zip library. Zip file will be help you reduce the file size with save better in your hard drive
So follow my step, you can easy do it
First download my DLL from
here
Using Ionic.Zip dll will be help you compress the file with minimize size as can as..
Add Reference to your projects
Using Ionic.Zip in your code :
Use zip.AddFile to zip one file
Source Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Ionic.Zip;
namespace ZipData
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
ZipFile zip = new ZipFile();
zip.AddFile("Ionic.Zip.dll");
zip.AddFile("test.txt");
zip.Save("All.zip");
}
}
}
After compress two file Ionic.Zip.dll and test.dll we go to compare it, see the result is same, that is completed :D
Any feedback on question please leave your comment, we can discuss about it!
Download full source code from here
Are you interested in topic How to Zip File, multiple file using C# programming language from Webzone Tech Tips? If you have any thoughts or questions, please share them in the comment section below. I would love to hear from you and chat about it
Happy Women's Day ^_^!Webzone Tech Tips Zidane