Questions tagged [zip]

ZIP is a format for compressed file archives, allowing packaging of multiple files and directories into a single file.

The specification for the standard is provided by PKWARE, a commercial company that sells compression software. There are multiple independent implementations of ZIP readers and writers, both libraries and finished programs, available on multiple platforms.

Desc

ZIP is a compression and file packaging utility for Unix, VMS, MSDOS, OS/2, Windows 9x/NT/XP, Minix, Atari, Macintosh, Amiga, and Acorn RISC OS. It is analogous to a combination of the Unix commands tar and compress and is compatible with PKZIP (Phil Katz’s ZIP for MSDOS systems).

Implementations

There are implementations for handling files in ZIP format for many languages:

8893 questions
102
votes
6 answers

How to read data from a zip file without having to unzip the entire file

Is there anyway in .Net (C#) to extract data from a zip file without decompressing the complete file? Simply I possibly want to extract data (file) from the start of a zip file, obviously this depends if the compression algorithm compress the file…
AwkwardCoder
  • 22,434
  • 24
  • 80
  • 143
101
votes
8 answers

Download Returned Zip file from URL

If I have a URL that, when submitted in a web browser, pops up a dialog box to save a zip file, how would I go about catching and downloading this zip file in Python?
user1229108
  • 1,109
  • 3
  • 10
  • 8
96
votes
11 answers

Can I zip more than two lists together in Scala?

Given the following Scala List: val l = List(List("a1", "b1", "c1"), List("a2", "b2", "c2"), List("a3", "b3", "c3")) How can I get: List(("a1", "a2", "a3"), ("b1", "b2", "b3"), ("c1", "c2", "c3")) Since zip can only be used to combine two Lists, I…
pr1001
  • 20,621
  • 16
  • 74
  • 123
94
votes
10 answers

How to update one file in a zip archive

Is it possible to replace a file in a zip file without unzipping deleting the old file adding the new file and rezipping it back? Reason is I have a zip file which is really big there is one xml inside the zip file that I have to update sometimes. …
user577732
  • 3,626
  • 9
  • 50
  • 75
92
votes
1 answer

Install php-zip on php 5.6 on Ubuntu

I can't install php-zip on my Ubuntu VM with the last php5.6. Can't find find anything clear on it. I still get that Apache error : PHP Fatal error: Class 'ZipArchive' not found in /var/www/uta/system/library/PHPExcel/PHPExcel/Writer/... Thanks
SoCkEt7
  • 2,088
  • 5
  • 20
  • 27
91
votes
6 answers

Zip including hidden files

In Linux I can zip all(except hidden files) in current directory by doing: zip 1.zip * But how do I include the hidden files?
john-jones
  • 6,711
  • 17
  • 47
  • 79
87
votes
1 answer

In Linux, zip multiple directories in one named zip file

I have the following directories, I want to zip up into the same zip file. Can someone provide the correct syntax? ie. zipping the following directories: /home/users/jlefler/files /opt/software/reports/files into a zip file called backup.zip.
user3299633
  • 2,035
  • 2
  • 16
  • 35
84
votes
4 answers

Python in-memory zip library

Is there a Python library that allows manipulation of zip archives in memory, without having to use actual disk files? The ZipFile library does not allow you to update the archive. The only way seems to be to extract it to a directory, make your…
John B
  • 2,831
  • 4
  • 29
  • 27
81
votes
8 answers

Unzipping files

I want to display OpenOffice files, .odt and .odp at client side using a web browser. These files are zipped files. Using Ajax, I can get these files from server but these are zipped files. I have to unzip them using JavaScript, I have tried using…
user69260
  • 1,357
  • 1
  • 11
  • 8
81
votes
11 answers

Simplest way to download and unzip files in Node.js cross-platform?

Just looking for a simple solution to downloading and unzipping .zip or .tar.gz files in Node.js on any operating system. Not sure if this is built in or I have to use a separate library. Any ideas? Looking for just a couple lines of code so when…
Lance Pollard
  • 66,757
  • 77
  • 237
  • 416
79
votes
9 answers

How do I attach the Android Support Library source in Eclipse?

Having the source code attached to external libraries is awesome. Where do I find the source code for the v4 support package? Preferably, it would be a zip file which could be easily attached to the android-support-v4.jar in Eclipse.
Håvard Geithus
  • 5,167
  • 5
  • 30
  • 49
79
votes
12 answers

java.util.zip.ZipException: error in opening zip file

I have a Jar file, which contains other nested Jars. When I invoke the new JarFile() constructor on this file, I get an exception which says: java.util.zip.ZipException: error in opening zip file When I manually unzip the contents of this Jar file…
Sandhya Agarwal
  • 969
  • 2
  • 8
  • 7
78
votes
3 answers

get file list of files contained in a zip file

I have a zip archive: my_zip.zip. Inside it is one txt file, the name of which I do not know. I was taking a look at Python's zipfile module ( http://docs.python.org/library/zipfile.html ), but couldn't make too much sense of what I'm trying to…
David542
  • 96,524
  • 132
  • 375
  • 637
78
votes
8 answers

Can git treat zip files as directories and files inside the zip as blobs?

The scenario Imagine I am forced to work with some of my files always stored inside .zip files. Some of the files inside the zip are small text files and change often, while others are larger but luckily rather static (e.g. images). If I want to…
Jonas Heidelberg
  • 4,784
  • 1
  • 25
  • 38
77
votes
6 answers

Read Content from Files which are inside Zip file

I am trying to create a simple java program which reads and extracts the content from the file(s) inside zip file. Zip file contains 3 files (txt, pdf, docx). I need to read the contents of all these files and I am using Apache Tika for this…
S Jagdeesh
  • 1,305
  • 2
  • 25
  • 45