Quantcast
Channel: DotNetZip Library
Viewing all 664 articles
Browse latest View live

Reviewed: v1.9.1.8 DotNetZip - Latest Stable (Jan 02, 2014)

$
0
0
Rated 2 Stars (out of 5) - I have been using this library for several months. I tried to zip both large MS Access files (*.mdb), approx. 1.5 GB and medium size (500 MB). It doesn't always work. It zips the file but sometimes when trying to unzip the archive using Windows Explorer (right-click on the file + Extract All), it returns an error... Not reliable.

New Post: Multi-threading deflation fails in certain cases

$
0
0
Hi,
I noticed a situation when deflating doesn't write all the data into the output file. Usually, everything is fine and I didn't figured out yet what conditions should meet for this to happen but I found at least one file. It is an MP3 file. When I create a new zip file (var objZipFile = new ZipFile(Encoding.UTF8)), then add this file (objZipFile.AddFile(objFile.PathName, String.Empty)), then call objZipFile.Save(objArchiveFile.PathName) with approximately 70 - 80% probability the result zip file will be incomplete and I won't be able to inflate it back.
I tracked the problem down to the ParallelDeflateOutputStream.Write method along with _DeflateOne method. ParallelDeflateOutputStream.Write spawns new tasks (threads) with ThreadPool.QueueUserWorkItem( _DeflateOne, workitem ) which in it's turn enqueues result buffers as _toWrite.Enqueue(workitem.index). Then EmitPendingBuffers takes its turn to actually write enqueued buffers and here is a problem with synchronization takes place. ThreadPool.QueueUserWorkItem is called as many times as necessary to deflate the whole file but let's say the last 3 tasks (threads) are not started yet. The control goes to the EmitPendingBuffers to finalize the deflation and it writes all buffers which were ready by now but after that the last 3 tasks starts working processing the last chunks of the data which do not end up into the output file.
Did somebody notice this problem before and already have a solution how to fix it?

Thank you,
Alex

New Post: Multi-threading deflation fails in certain cases

$
0
0
It seems like this did the trick
        } while (doAll && (_lastFilled != _latestCompressed || _lastWritten != _latestCompressed));
but this is not entirely clean. The outer loop doesn't have waiting for _DeflateOne completion. Continue looking into it.

Alex

Reviewed: v1.9.1.8 DotNetZip - Latest Stable (Jan 09, 2014)

$
0
0
Rated 1 Stars (out of 5) - The lib contains critical issues http://dotnetzip.codeplex.com/workitem/14087 which is an absolute showstopper for using it in production to create zip files. Unfortunately, the project seems no longer active. Personally, I'd recommend resorting to SharpZipLib for anything that can't be done using built-in support in .NET 4.5.

Reviewed: v1.9.1.8 DotNetZip - Latest Stable (Jan 09, 2014)

$
0
0
Rated 1 Stars (out of 5) - The lib contains critical issues http://dotnetzip.codeplex.com/workitem/14087 which is an absolute showstopper for using it in production to create zip files. Unfortunately, the project seems no longer active. Personally, I'd recommend resorting to SharpZipLib for anything that can't be done using built-in support in .NET 4.5.

Commented Issue: name clash possible with temporary file during extraction [14097]

$
0
0
Ok let me try to explain it better.
 
Suppose I have a zip file which contains: helloworld.txt test.txt
 
Now suppose I try to extract this zipfile into a directory, c:\Test . What happens is, for each file in the zipfile the library creates a filename.ext.tmp while he unpacks the specific file of the ze.Extract. That means, when it extracts helloworld.txt on ze.Extract(...); in the folder c:\test\ there will be a file called helloworld.txt.tmp till extract finishes.
 
A problem occurs when C:\test already has a file called helloworld.txt.tmp . If that happens, the library just fails with a message stating that the file already exists (the helloworld.txt.tmp, not the helloworld.txt).
Comments: ** Comment from web user: Serg_G **

I have faced this issue trying to unpack a lot of items into the one directory parallel. It seems like there was files with one name in some zips. So in spite of _ExtractExistingFileAction.OverwriteSilently_ option the conflict of _tmp_ filenames lead to the exception.

Created Unassigned: rename files and remove folder structure [16646]

$
0
0
I need rename the files I drop into the zip AND I don’t want to have the directory structure in the zip. It seems the two are mutually exclusive. How can I create a zip with no folder structure AND rename the files? I tried combining the two and cannot make it work.

This removes the folder structure… but keeps the file name.

using (ZipFile zip = new ZipFile())
{
zip.AddFiles(FilesToZip, "");
zip.Save(NameOfZip);
}

While this renames the files… but keeps the directory structure.

foreach (ZipEntry e in zip)
{
e.FileName = e.FileName.Replace(BatchList.Batchs[i].ProcessID, "");
zip.Save(NameOfZipFileTocreate);
}

New Post: Creating zip hangs and only DotNetZip-xxxxxxxx.tmp is created.

$
0
0
I created a very basic project that has a string path for each the source directory and destination zip file path. Single files seem to work okay but multi file attempts stop during the creation of the zip file and I am left only with a DotNetZip-xxxxxxxx.tmp. I have tested this on every .Net 3.5, 4.0 and 4.5 all with the same results. Any suggestions?

New Post: Issue creating selfextractor exe with greater than 2GB and running it on 32bit OS

$
0
0
Hello,
I am using Ionic.Zip 1.9.1.8 to create self extractor exe. And I am able to run them on 64 bit operating systems. But once I run the same (which has size under 4GB..lets say 2.8 GB), I get some times error telling cannot find compatible framework version not found. But if I install the .NET Framework 4.5 (I tried on Windows 7 ), then it throws SHIM error (which microsoft says gets thrown if you run an app which is build for "x" platform and trying to run on "y".

The latter looks to me like on specific conditions the extraction happens with 64 bit mode enabled (not sure though).

ZipFile zip = new ZipFile();
if (!IsOperatingSystem64Bit())
{
      zip.UseZip64WhenSaving = Zip64Option.Never;
 }
else
  {
        zip.UseZip64WhenSaving = Zip64Option.Always;
   }
I did as above but it still not helping me and the sfx options also doesnt have anything useful. Strange thing is that everything works well in both 32bit OS and 64bit OS until the exe size is under 2GB. 32Bit takes a toll after that. Any thoughts would be helpful.

Created Unassigned: Issue creating selfextractor exe with greater than 2GB and running it on 32bit OS [16654]

$
0
0
Hello,
I am using Ionic.Zip 1.9.1.8 to create self extractor exe. And I am able to run them on 64 bit operating systems. But once I run the same (which has size under 4GB..lets say 2.8 GB), I get some times error telling cannot find compatible framework version not found. But if I install the .NET Framework 4.5 (I tried on Windows 7 ), then it throws SHIM error (which microsoft says gets thrown if you run an app which is build for "x" platform and trying to run on "y".

The latter looks to me like on specific conditions the extraction happens with 64 bit mode enabled (not sure though).

ZipFile zip = new ZipFile();
if (!IsOperatingSystem64Bit())
{
zip.UseZip64WhenSaving = Zip64Option.Never;
} else
{
zip.UseZip64WhenSaving = Zip64Option.Always;
}
I did as above but it still not helping me and the sfx options also doesnt have anything useful. Strange thing is that everything works well in both 32bit OS and 64bit OS until the exe size is under 2GB. 32Bit takes a toll after that. Any thoughts would be helpful.

Note: Same is posted under discussions also since there are no responses and couldn't find an option to move the post to issues, copied and pasted here.

New Post: FolderBrowserDialogEx fails to check Invalid path strings

$
0
0
HI all,
   I am using FolderBrowserDialogEx, when i write any UNC path address in the text box, if by mistake i give the wrong path, folderbrowserdialogex crashes/hangs. Is there any way that we can check if a given path is valid or accessible and rather than crashing, pop up a error window.
Also, if i give path "\/D:/" it returns a empty path string, while if we use same path address in internet browser it open up "the Index of D:\".

Thanks in advance
Akshat

New Post: Command line to execute exe on unpack

$
0
0
Hello someone please help with this head aching issue,I tried using dotnetzip(GUI) tools to create a console self extracting exe,i filled in all the required argument on the form,it extracted fine but could not run the exe on unpack,i got this error"the system can not find the file specified at system.diagnostic.process.startwithShellExecuteEx<process start info> at......
please any one with the right solution on what to input at the "exe on unpack" field?
your contribution would be well appreciated.

Created Unassigned: Command line to execute exe on unpack [16656]

$
0
0
Hello someone please help with this head aching issue,I tried using dotnetzip(GUI) tools to create a console self extracting exe,i filled in all the required argument on the form,it extracted fine but could not run the exe on unpack,i got this error"the system can not find the file specified at system.diagnostic.process.startwithShellExecuteEx<process start info> at......
please any one with the right solution on what to input at the "exe on unpack" field?
your contribution would be well appreciated.

Commented Unassigned: Command line to execute exe on unpack [16656]

$
0
0
Hello someone please help with this head aching issue,I tried using dotnetzip(GUI) tools to create a console self extracting exe,i filled in all the required argument on the form,it extracted fine but could not run the exe on unpack,i got this error"the system can not find the file specified at system.diagnostic.process.startwithShellExecuteEx<process start info> at......
please any one with the right solution on what to input at the "exe on unpack" field?
your contribution would be well appreciated.
Comments: ** Comment from web user: kabilraj **

That error means that the post extract executable path known to the tool and where it resides are different. You will have to give the relative path of the executable to be run after extraction.
Something like PostExtractCommandLine = ".\\myexecutable.exe", which means that the extractor tool will look for executable named "myexecutable.exe" under to root self extraction folder. Let me know if this works.

New Post: Continued development of DotNetZip

$
0
0
It does seem correct that the project hasn't been abandoned, but management is in a critical state right now. If there have been updates, even if they are not critical, a new stable release should be pushed.

Things are worse on the NuGet side. There are no indications that "control" has passed to any other individuals, yet a separate fork of the project on GitHub is being used as the latest release version (1.9.2) for NuGet. This is problematic for several reasons, not the least of which is that DotNetZip.semverd 1.9.2 is unsigned since the snk for the project is not shared. It would be a shame to see such a stable and useful piece of OSS drift into obscurity because of mismanagement.

How do we get this back on track?

-Marc

New Post: Encryption and Password

$
0
0
I am trying to create an encrypted zip file with a password.
I have something like this:

ZipFile zf = new ZipFile();
zf.AddDirectory("Some directory");
zf.Encryption = EncryptionAlgorithm.WinZipAes256;
zf.Password = "Password";
zf.Save("ZipFile.zip");

However it's creating a normal zip file no encryption and password.

What am I doing wrong?

Thank you.

New Post: Creating zip hangs and only DotNetZip-xxxxxxxx.tmp is created.

$
0
0
I am experiencing the same issue. Any suggestions?

New Post: Recursively zipping and unzipping directory structure

$
0
0
Hello,

Can I recursilvely zip and unzip an entire directory structure, including all contained folders and files, using DotNetZip.

Please provide code examples in either C++,C# or VB.

Thank you,
Alona

Created Unassigned: Could not extract multivolume zip. [16683]

$
0
0
I have created a multivolume zip file with password using C#. But the problem is, when I extract it with windows default extractor, it gives an error that the file is corrupted.

If I create it without using MaxOutputSegmentSize then the zip file gets extracted easily.

New Post: FileNotFoundException creating Self Extracting File (1.9.1.8)

$
0
0
I am using: [assembly: AssemblyVersion ("1.9.1.8")] and getting the following error when I try and create a Self Extracting File.


ERROR MESSAGE:

exception: System.IO.FileNotFoundException: Could not find file '[filename]/full.exe'.
File name: '[filename]/full.exe'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I
nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o
ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolea
n useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share)
at Ionic.Zip.ZipFile.get_ReadStream()
at Ionic.Zip.ZipFile.ReadIntoInstance(ZipFile zf)
at Ionic.Zip.ZipFile.Reset(Boolean whileSaving)
at Ionic.Zip.ZipFile.Save()
at Ionic.Zip.ZipFile.SaveSelfExtractor(String exeToGenerate, SelfExtractorSav
eOptions options)
at GenerateOfflineBrowser.CopyFiles.ZipUp(Boolean bVersion)

CODE:

using (ZipFile zip = new ZipFile()) {
    zip.AddDirectory(_destinationFolder); // recurses subdirectories
    zip.Save(ZipFileToCreate);

SelfExtractorSaveOptions options = new SelfExtractorSaveOptions();

    options.Flavor = SelfExtractorFlavor.WinFormsApplication;
    options.DefaultExtractDirectory = "%USERPROFILE%\\CriminalLawWeek";
    options.RemoveUnpackedFilesAfterExecute = true;

zip.SaveSelfExtractor(EXEFileToCreate, options);
}

The code is in a DLL that is used in a console EXE program. It is zipping up files and then saving as an EXE file.

Any help would be appreciated!

John
Viewing all 664 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>