Zip archive formats are messy full stop. There are many possible places where things can go awry. Worse much of the code handles special cases were other existing code is wrong but tolerated so its even possible that the problem is in handling of bad code rather than disagreeing on how things should really be done. In short Neils view that you should stick with what works Zip 0. Given the situation it may not be found. Having said all that the simplest way it to compare the archives and see what is different about them which is sometimes not very much.
It may actually be easy to figure out whats going wrong. I did have some code that analysed ZIP archive in some detail that allowed that kind of thing to be done which I might have lurking somewhere This brings up issues of size of the archives and the sensitivity of the contents etc, but if its possible then yeah lets have a look.
On Sun, 14 Aug at Johnno john. Skip to content. Star 2. New issue. Jump to bottom. Compatibility SharpZipLib 0. Labels documentation wontfix zip.
Milestone 1. Copy link. I tried ICSharpCode. Off but no luck. Any other ideas? Thanks, Werner Steps to reproduce 1. Make a Zip with SharpZipLib 0. Once the user has confirmed that the appropriate disk is in the drive, set the DiskRequiredAction to Continue. Setting the Action to Fail will not cause the whole operation to fail, but only the deleting step to be skipped.
Do you want to filter specify specific files and folders the items that are to be added to the zip file? Use filters. Do you want to display the status of the operation? See the Events topic. Do you want to add items into a specific folder within the zip file? Create an instance of a ZippedFolder object rather than a ZipArchive object. Do you only want to copy a specific file or folder? Use the CopyTo method. Do you want to move items rather than copy them?
Do you want to change the location of the temporary folder. Do you only want to do basic zip file operations? Use the QuickZip class. Do you want to modify the default extra headers that are stored to a zip file? All zip files will automatically be created in the Zip64 zip file format if the limitations of the regular Zip format are reached.
Create txtSaveTo. ZipEntry Path. GetFileName file ;. PutNextEntry entry ;. OpenRead file. Read buffer, 0, buffer. Length ;. Write buffer, 0, sourceBytes ;. Finish ;. Close ;.
Delete txtSaveTo. Show "Zip. Clear ;. ToString , "Zip Operation Error " ;. Dispose ;. Summary: This example demonstrates zipping up a folder using the SharpZipLib; in this example, the interface is provided in the form of a stand alone desktop application.
The same approach described in this project could be applied within the context of a large application that may be required to gather up multiple files and zip them into a single zipped folder.
As with all things, there are other ways to do this same sort of thing, however, given the availability of the SharpZipLib, this is a relatively simple process. View All. Scott Lysle Updated date May 19, The imports, namespace, and class declarations are as follows: using System; using System.
Collections; using System. Text; using System. IO; using System. ComponentModel; using System. Forms; using System. Management; using ICSharpCode. Checksums; using ICSharpCode.
0コメント