Zip subfolders using ZipOutputStream
问题 ZipOutputStream only zips files in a folder. I want to zip subfolders also. How can I achieve this? 回答1: You have to recursively explore your directory in order to add all files in the zip. See this small helper if you wish: using ICSharpCode.SharpZipLib.Zip; using ICSharpCode.SharpZipLib.Checksums; using System.IO; using System; using System.Collections.Generic; using System.Text; using System.Collections; using System.Text.RegularExpressions; namespace Zip { /// <summary> /// Uses