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

New Post: Unable to open zip files using window Extract All or double click[opens in 7 zip]

$
0
0
Zip created by using DotNetZip does not open using window extract all or double click, but it unzipped with 7 zip.
We converted DataTable to Csv by using an extension method, Added csv to a zip.
 string TestCsv = extensionMethods1.ToCsv(TestDataTable);

 string archiveName = String.Format("TestInfo-{0}.zip", DateTime.Now.ToString("yyyy-      MM-dd-HHmmss"));

  Response.ContentType = "application/zip";
  Response.AddHeader("content-disposition", "filename=" + archiveName);

  using (ZipFile TestZip = new ZipFile())
  {
        TestZip.AddEntry("test1.csv", TestCsv);
        TestZip.Save(Response.OutputStream);
  }
  Response.Flush();
  Response.Clear();
The downloaded zip extracted successfully using 7 zip but does not open using windows Extract All or by double clicking.

Please suggest if something is missing in the code,

Thanks

New Post: Install_DotNetZipLib-v1.9.1.6.bat crashing

$
0
0
I'm also receiving this error. Were you able to find a solution to this?

New Post: Install_DotNetZipLib-v1.9.1.6.bat crashing

$
0
0
No, I did not find a solution. I ended up using 'Zip compression for .Net' (http://www.dart.com) from Dart Communications. It just works and works well.

New Post: Install_DotNetZipLib-v1.9.1.6.bat crashing

$
0
0
Thanks for the reply. I'll check the link you provided.

New Post: Could not load file or assembly 'Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c' or one of its dependencies. The system cannot find the file specified.

$
0
0
Hi,

We are Ionic.Zip.dll in our 3.5 framework project.

We are using this dll to unzip a file but getting below error when we schedule our application which is using Ionic.Zip.dll. However it woks fine when we mannualy run the application:

Could not load file or assembly 'Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c' or one of its dependencies. The system cannot find the file specified.

New Post: Please provide confirmation on license

$
0
0
Hi,
We are using Ionic.zip.dll in our project. We add a reference of the Ionic.zip.dll to the proect and use claases and functions given in this dll to unzip a zip file. We are going to use our project commerically.

Could you please confirm if a licence is required for Ionic.zip.dll.

New Post: Does using the DotNetZip (ionic.zip.dll) require admin privileges?

$
0
0
Hi,

First of all, please let me express my gratitude toward the development team for DotNetZip library. It is a great tool for creating ZIP archives in VB .NET 2008.

I'm running into a small problem, and would like to see if any one has experienced anything similar. Basically, everything works great in Windows XP. However, for Vista, 7 and 8, where UAC (User Account Control) is enabled, this is where I am not able to create the zip archive. I have an error saying that one of the files that I am trying to add to the archive cannot be accessed. The file resides in the Windows non-protected area of C:\ProgramData, so I assume that this would not be a problem.

Has anyone seen this before? And do you know that in order to use DotNetZip library, that the user running the app would have to be a local admin user or belonging to the local admin group of the PC?

Your help is greatly appreciated. Thank you and have a nice day.

Khoi Nguyen.

New Post: Don't Include Parent Path

$
0
0
I'm sorry if this question has been asked many times before. I'm new to this forum.

Let's say I have a zip file with another file in it, with a path of C:/Users/Admin/Something.txt.
If I were to save the zip file, and then read it, I would have to browse Users, Admin, and then I would find Something.txt.

Any ways to have the file without browsing anything?

New Post: Don't Include Parent Path

Commented Issue: ZipFile.AddFile fails depending of the file size. [14087]

$
0
0
AddFile truncate the entry, and Extract trow an exception "bad read of entry test/MyFile.txt from compressed archive."
 
Debugging step by step sometimes work fine.
 
My code:
 
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim str As New String(" "c, 2490368)
IO.File.WriteAllText("C:\test\MyFile.txt", str)
End Sub
 
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Using zip As New Ionic.Zip.ZipFile
zip.AddFile("C:\test\MyFile.txt")
zip.Save("C:\test\MyZip.zip")
End Using
End Sub
 
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Using zip As Ionic.Zip.ZipFile = Ionic.Zip.ZipFile.Read("C:\test\MyZip.zip")
For Each arch As Ionic.Zip.ZipEntry In zip
arch.Extract("C:\test\opened")
Next
End Using
End Sub
Comments: ** Comment from web user: iosifpetre **

mohammadforutan, is nice that "zip.ParallelDeflateThreshold = -1" resolved your issue but how do I extract the files, that is when you create the file, but how to fix to get the file, I need the data from the files archived..
please help

Commented Issue: ZipFile.AddFile fails depending of the file size. [14087]

$
0
0
AddFile truncate the entry, and Extract trow an exception "bad read of entry test/MyFile.txt from compressed archive."
 
Debugging step by step sometimes work fine.
 
My code:
 
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim str As New String(" "c, 2490368)
IO.File.WriteAllText("C:\test\MyFile.txt", str)
End Sub
 
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Using zip As New Ionic.Zip.ZipFile
zip.AddFile("C:\test\MyFile.txt")
zip.Save("C:\test\MyZip.zip")
End Using
End Sub
 
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Using zip As Ionic.Zip.ZipFile = Ionic.Zip.ZipFile.Read("C:\test\MyZip.zip")
For Each arch As Ionic.Zip.ZipEntry In zip
arch.Extract("C:\test\opened")
Next
End Using
End Sub
Comments: ** Comment from web user: divo **

@iosifpetre: There is no way to recover the zip archive once it is corrupted. That is why this issue is so critical. I'd recommend using another zip library like SharpZipLib or the functionality included in the current .NET Framework version.

Reviewed: v1.9.1.8 DotNetZip - Latest Stable (Apr 11, 2013)

$
0
0
Rated 5 Stars (out of 5) - This is such a great library. I was able to get rid of Shell32 Interop code. Thanks!

New Post: Does using the DotNetZip (ionic.zip.dll) require admin privileges?

$
0
0
Hello

What type of file are you trying to add to the .zip file?

I have successfully used DotNetZip in several projects which are run by limited (non admin) users and have never experienced any problems when creating or extracting zip files.

Can you give more information on your use-case scenario please ?

Kind Regards
Alistair

New Post: Digital Signatures for Packages

$
0
0
Hi Zach

As far as I know there is no support for digitally signing .zip files, but this is because the .zip format itself does not support it

I can think of one workaround that would be to calculate a Hash value (fingerprint) of the .zip file data and then convert that hash value to base64 (readable text) and store that in the ZipFile Comment field.

Then to check if the file has been tampered with you could re-hash the data and compare it to the hash saved in the comment field

Just an idea

Hope it helps

New Post: Does using the DotNetZip (ionic.zip.dll) require admin privileges?

$
0
0
Hi,

Here is the process I'm trying to do. I have a VB 2008 application, which connects to a SQL Server 2005 Express DB. This VB app has a feature that allows the user to backup the database. Database back up is nothing more than detaching the DB files, then make a copy of the DB files (.mdf, and .ldf), add the DB files to an archive (using DotNetZip), and lastly, re-attach the DB files again to the existing SQL Server instance.

What I have discovered is that even though the DB files (before attaching to SQL Server 2005 Express) has "Everyone" - "Full Control" in the ACL. After detaching it from SQL Server 2005 Express) the "Everyone" - "Full Control" has been removed from the ACL, thus, causing the ZIP process to crash, if I run the app as a Standard User in Windows 7 (with UAC enabled). I have discovered a way to make this work, which is after detaching the DB files, I would manually update the files' ACL to include "Everyone" - "Full Control"; then ZIP works just fine under Standard User in Windows.

Sorry for the long description. Hope it's not too confusing.

Thanks for the help.

Khoi.

Created Issue: CreationTime is incorrect [16154]

$
0
0
I am having trouble accessing the creation date of files in a zipped file. The file creation time is correct but the creation date is
always equal to the current date. Other fields like ModifiedTime are correct.

The following code illustrates the problem.
```
using (ZipFile zip = ZipFile.Read(zippedFile))
foreach (ZipEntry zipEntry in zip)
{
string standardizedZipName = zipEntry.FileName.Replace('\\', '/');
if (zipEntry.IsDirectory)
{ //path name
Console.Write("Directory: " + zipEntry.FileName
+ " Created " + zipEntry.CreationTime.ToString());
} //ends path name
else
{ //file name
Console.Write(" " + zipEntry.FileName
+ " Created " + zipEntry.CreationTime.ToString()
+ " Modified " + zipEntry.ModifiedTime.ToString()
+ " Last modified " + zipEntry.LastModified.ToString());
} //ends file name
} //ends foreach (ZipEntry...
```
The output shows:
Running on 4/13/2013 9:37:15 PM
jigo-src-2.1.1/build.xml Created 4/13/2013 2:46:28 PM Modified 2/7/2003 8:07:50 AM Last modified 2/7/2003 12:07:50 AM
Directory: jigo-src-2.1.1/conf/ Created 4/13/2013 2:46:28 PM
jigo-src-2.1.1/conf/jigo.pro Created 4/13/2013 2:46:28 PM Modified 1/28/2003 8:37:17 AM Last modified 1/28/2003 12:37:18 AM
jigo-src-2.1.1/conf/packages.txt Created 4/13/2013 2:46:28 PM Modified 1/28/2003 8:31:43 AM Last modified 1/28/2003 12:31:44 AM
jigo-src-2.1.1/conf/README Created 4/13/2013 2:46:28 PM Modified 1/28/2003 7:47:38 AM Last modified 1/27/2003 11:47:38 PM
Directory: jigo-src-2.1.1/docs/ Created 4/13/2013 2:46:28 PM

I am running Ionic.Zip.dll 1.9.1.8 using C# Microsoft VS 2012 Express on Windows 8 but have the same problem on a Windows 7 system
using VS 2012.

Any suggestions?

New Post: Cannnot compress multi byte filename.

$
0
0
I am using Ionic.Zip.dll v1.9.1.8 on Visual Studio 2008.

I want to include some multi byte filename(Japanese) to zip file in Windows 2008 Server.
The server's language setting is English.
I was prepared some file having multi byte filename.
But, there cannnot compressed.
(single byte filename can compressed.)

Please help.

Created Issue: Size of extracted file does not match the uncompressed size recorded in the zip file [16173]

$
0
0
When the attached file, TestZipItBug.dat, is added to a zip file using ZipIt with all default options, the resulting entry in the zip file cannot be extracted with the Ionic.Zip.dll or with standard WinZip. WinZip reports the following:


Extracting to "C:\Temp\"
Use Path: yes Overlay Files: no
Extracting testzipitdeflatebug.dat
CRC check failed
Error: Unable to extract "C:\Temp\testzipitdeflatebug.dat".

The size of the extracted file (2686976) does not match the uncompressed size (3080192) recorded in the Zip file


NOTE: This also happens when using "-C none" option to avoid compression. However, if "-C bzip" is used, then the resulting zip entry extracts ok.

Patch Uploaded: #14368

$
0
0

birreller has uploaded a patch.

Description:
ParallerDeflateOutputStream.cs

Fixes the corrupt CRC issues of files that are multiples of 64KB and random hanging.

New Post: "Bad CRC32 in GZIP trailer" error if I don't read the whole stream

$
0
0
I'm using the GZipStream as a drop in replacement for the .Net one. For one operation I open with a binary reader and just read a string from the start of the file.

When i close the BinaryReader I get Bad CRC32 in GZIP trailer

Same question shows up from 2011 on Stack Overflow
http://stackoverflow.com/questions/7462220/am-i-really-forced-to-readtoend-a-streamreader-reading-an-ionic-zlib-gzipstrea

I'm running 1.9.1.8 - it worked with the .Net version but the .Net version doesn't run on the xbox and doesnt compress well.

This is the code:
using (var fs = File.Open(Filename, FileMode.Open, FileAccess.Read, FileShare.Read))
{
   using (var compress = new GZipStream(fs, CompressionMode.Decompress))
   {
     var reader = new BinaryReader(compress);
     Name = reader.ReadString();
     reader.Close();                            <--Exception happens here
     compress.Close();
  }
}
Viewing all 664 articles
Browse latest View live


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