Share via


Zip large file in C#

Question

Tuesday, May 14, 2019 5:18 PM

Hi All,
I want to zip a large file (size 100GB) in C#.
Can any one suggest me how can i proceed to do this?

All replies (2)

Tuesday, May 14, 2019 6:55 PM | 1 vote

Hello,

 

 First, using the link below, read about the compress/extract process.

 

 https://docs.microsoft.com/en-us/dotnet/standard/io/how-to-compress-and-extract-files

 

 Second, using the link below, review and test build examples of project code.

 

 https://docs.microsoft.com/en-us/dotnet/api/system.io.compression.ziparchive?view=netframework-4.8

 

 The above links should guide and provide everything you need to get your

project started. If you have problems then post a thread here with specifics.

 

 Hope this helps :)


Wednesday, May 15, 2019 5:38 AM

Hi PhanNam,

Thank you for posting here.

You can use 'ICSharpCode.SharpZipLib' to compress and decompress file.

Download the latest version:

https://github.com/icsharpcode/SharpZipLib

See the following links for sample codes:

https://github.com/icsharpcode/SharpZipLib/wiki/Zip-Samples

https://github.com/icsharpcode/SharpZipLib/issues/34

Please note the limit of size when subsection compression:

https://www.codeproject.com/Articles/21498/A-Console-ZIP-Utility-Using-ICSharpCode-SharpZipLi

Hope this helps.

Best Regards,

Wendy

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].