[
  {
    "Id": "228848",
    "ThreadId": "67339",
    "Html": "<p>DotNetZip now lets you create or read &quot;split&quot; zip files.&nbsp; For this you need v1.9 of the library, currently in preview.</p>\r\n<p>Lots of people have asked for this, and the feature is finally here.&nbsp; To create a split zip with DotNetZip, set MaxOutputSegmentSize on the ZipFile instance, and then just call Save() as usual.&nbsp; The zipfile will be saved into multiple discrete files, as many as necessary, each with the given maximum size.&nbsp;</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre>    <span style=\"color:Blue\">using</span> (<span style=\"color:Blue\">var</span> zip = <span style=\"color:Blue\">new</span> ZipFile())\r\n    {\r\n        zip.AddDirectory(directoryToZip, <span style=\"color:#A31515\">&quot;files&quot;</span>);\r\n        zip.MaxOutputSegmentSize = 128*1024;  <span style=\"color:Green\">// 128k</span>\r\n        zip.Save(<span style=\"color:#A31515\">&quot;Archive.zip&quot;</span>);\r\n\r\n        Console.WriteLine(<span style=\"color:#A31515\">&quot;number of segments: {0}&quot;</span>, \r\n                          zip.NumberOfSegmentsForMostRecentSave);\r\n    }\r\n</pre>\r\n</div>\r\n<p>The segments are named &quot;Archive.z01, Archive.z02, and so on.&nbsp; The final file is Archive.zip.&nbsp; To read a split zip file produced by DotNetZip or WinZip, just do a ZipFile.Read() on the file with the .zip extension.&nbsp; DotNetZip will automatically load in the .z01 (etc) files as necessary.&nbsp;</p>\r\n<p>This feature is really handy where there are limits to the sizes of the files you want to create.&nbsp; For example, when uploading to SkyDrive or when sending a zip file in a series of emails, each of which has a size-limit for the attachment.</p>\r\n<p>As far as I know, every other feature in the library composes nicely with zip splitting.&nbsp; The exception is self-extracting archive.&nbsp; You cannot have a &quot;split&quot; SFX, but you can have an AES-encrypted split zip file.&nbsp; You can have a ZIP64 split archive.&nbsp; Unicode, etc.&nbsp;</p>\r\n<p>This is a new feature, and is currently the least tested feature in the library.&nbsp; So for now this capability is available as an &quot;alpha&quot; release.&nbsp; As I test it more thoroughly and get comfortable with its reliability, it will graduate into beta and released status.</p>\r\n<p>Please try it out.&nbsp; <a href=\"http://dotnetzip.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27890\">http://dotnetzip.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27890</a></p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-08-28T13:55:13.853-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]