zip

How to get the compression ratio for a GZipped file ?

Here is how I compressed the data: <%@ page import="javax.servlet.jsp.*,java.io.*,java.util.zip.*" %> <% String encodings = request.getHeader("Accept-Encoding"); PrintWriter outWriter = null; if ((encodings != null) && (encodings.indexOf("gzip") != -1)) { OutputStream outA = response.getOutputStream(); outWriter = new PrintWriter(...

download zip file using java?

I am downloading zip file from web server using Java but somehow I am loosing about 2kb in each file. I don't know why since same code works fine with other formats, e.g, text, mp3 and extra. any help is appreciated? here is my code. public void download_zip_file(String save_to) { try { URLConnection conn = this.url.openConn...

Remove excess empty directories in uploaded zip file.

Hello, I am trying to remove excess directories from an uploaded zip file. For example I would like to transform : /folder1/folder2/folder3/ [Files are in this folder] to /folder1/[files are in this folder] Any help would be appreciated, Thanks. Hello, I am trying to remove excess directories from an uploaded zip file. For ex...

ASP.NET Download All Files as Zip

I have a folder on my web server that has hundreds of mp3 files in it. I would like to provide the option for a user to download a zipped archive of every mp3 in the directory from a web page. I want to compress the files programmatically only when needed. Because the zip file will be quite large, I am thinking that I will need to send ...

generation of multiple reports and zipping in codeigniter php

I want to generate multiple pdf reports on click of single print button and zip all the pdf's and store it in a folder. Any help please. I need this functionality in my project. ...

Which encoding (code page) is used for file names in ZIP archive under Mac OS x 10.6

I have a zip library SharpZipLib which intended to work with ZIP archives using C#. It has parameter ICSharpCode.SharpZipLib.Zip.ZipConstants.DefaultCodePage which specifies encoding of file names in zip archive. I know that in Windows and in OSX different encodings are used to store file names. 1) Which encodings (code pages) are used ...

How to get Host OS (operating system) parameter of ZIP archive in C#

Look. I have ZIP archives prepared in different os'es: mac, linux, windows. In windows file names encoded in DOS CP866, mac & linux in UTF-8. I need to know (in code) in which os zip file was prepared to decode file names correctly. There is a Host OS paramterer in "Central directory structure" of zip file (look http://www.fileformat.inf...

How to treat .zip files as directories in C#?

I want to be able to be able to read files in zip files just as I would read files in a physical folder. How can I do this without having to extract the files? ...

Extracting specific files from ZIP in PHP

If I have a ZIP file whose structure is: -directory1 DIR -files in here -directory2 DIR -more files in here Using pclzip.lib.php how can I open up this ZIP file and extract directory1 (recursive) into a directory and then extract directory2 (recursive) into another directory. ...

How can I convert a zfo to a standard xml file?

I have this file format from 602 form filler. Unfortunately 602 sotfware no longer offer an SDK to their product. I've uploaded the file here : http://cid-d53719d869fb8243.skydrive.live.com/self.aspx/Public/31602.zfo I can't figure out how convert the file from zfo to .fo. Honestly I don't even know if the file is zipped or encoded, s...

uploading zip files in codeigniter won't work

I have created a helper that requires some parameters and should upload a file, the function works for images however not for zip files. I searched on google and even added a MY_upload.php -> http://codeigniter.com/bug_tracker/bug/6780/ however I still have the problem so I used print_r to display the array of the uploaded files, the im...

ZipArchive php Class - Is it built-in to PHP?

Ok, just wondering on the versions of PHP that this class is built into. And if they are built into all platforms (OS's). I'm wanting an approach to search through a zip file and place files using file_put_contents in different filepaths within the webroot. In any case, I'm familiar with how to do this with the ZipArchive class, but I...

C# - Extract Zip with file listing

I would like to extract a pre-set zip file WITHOUT an external library to a given folder, and I would like to inform the user about the current percent of extraction (with a simple progressBar and a percent label) and the currently extracted file. Is this possible somehow? It is important to do not use any other library. (For updating ...

when does java.util.zip.ZipFile.close() throw IOException?

Under what circumstances would java.util.zip.ZipFile.close() throw an IOException? Its method signature indicates that it can be thrown, but from the source code there doesn't seem to be any place where this could happen, unless it's in native code. What corrective action, if any, could be taken at the point where that exception is caugh...

Using Fzip lib under Adobe Air App

I'm currently working on a project for Adobe Air (1.5.3) and I need to unzip a file, copy some of its contents to another file. Then I saw people talking about the Fzip (http://codeazur.com.br/lab/fzip) lib. The problem is that I don't know how to "import" or use this library with Javascript and Adobe Air, since Javascript doesn't have...

In cygwin, why is there a lingering file filename.zip in a directory after running rm filename.zip?

In cygwin in windows vista, I tried to remove a few zip files I created from the command line in cygwin. The rm finished without complaining, but there remains entries for these zip files in the directory, that cannot be opened or deleted, either in cygwin or vista. For example, ls -l shows the following after performing the rm: $ ls -...

PNGException "crc corruption" when attempting to create ImageIcon objects from ZIP archive

I've got a ZIP file containing a number of PNG images that I am trying to load into my Java application as ImageIcon resources directly from the archive. Here's my code: import java.io.*; import java.util.Enumeration; import java.util.zip.*; import javax.swing.ImageIcon; public class Test { public static void main( String[] args ) ...

creating zip/rar/tar of folders in Joomla

Hi All, Please somebody help me. I want to compress a folder (which contains images & text files as well as few sub folders) in zip,rar,tar format & then give it for download to user. Is there any class/api/library/code to do so. I am working on Joomla CMS. Regards, Shahu. ...

KaZip for C++Builder2009/Delphi

Hi. I have download and install KaZip2.0 on C++Builder2009 (with little minor changes => only set type String to AnsiString). I have write: KAZip1->FileName = "test.zip"; KAZip1->CreateZip("test.zip"); KAZip1->Active = true; KAZip1->Entries->AddFile("pack\\text.txt","xxx.txt"); KAZip1->Active = false; KAZip1->Close(); now he create a...

TurboPower Abbrevia in C++Builder2009

I want install TurboPower Abbrevia 3.05 from http://sourceforge.net/projects/tpabbrevia/ but its not working. :( docu says: _4. Open & compile the runtime package specific to the IDE being used (e.g. B305vr2007.dpk for Delphi2007) Start C++Builder2009 -> "Open Project..", select "B305vr2009.dpk" and click "open", but nothing happen. W...