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.

Implementations

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

11022 questions
183
votes
9 answers

How to unzip a file using the command line?

Which commands can be used via the command line to unzip a file? Preferably something built into Windows or open source/free tools.
Th3Fix3r
178
votes
6 answers

Read a zipped file as a pandas DataFrame

I'm trying to unzip a csv file and pass it into pandas so I can work on the file. The code I have tried so far is: import requests, zipfile, StringIO r =…
user2793667
  • 1,781
  • 2
  • 11
  • 3
178
votes
17 answers

How to create a zip file in Java

I have a dynamic text file that picks content from a database according to the user's query. I have to write this content into a text file and zip it in a folder in a servlet. How should I do this?
Ashish Agarwal
  • 6,215
  • 12
  • 58
  • 91
177
votes
20 answers

How to zip a whole folder using PHP

I have found here at stackoveflow some code on how to ZIP a specific file, but how about a specific folder? Folder/ index.html picture.jpg important.txt inside in My Folder, there are files. after zipping the My Folder, i also want to delete…
woninana
  • 3,409
  • 9
  • 42
  • 66
173
votes
10 answers

How to create full compressed tar file using Python?

How can I create a .tar.gz file with compression in Python?
shahjapan
  • 13,637
  • 22
  • 74
  • 104
168
votes
14 answers

Need to ZIP an entire directory using Node.js

I need to zip an entire directory using Node.js. I'm currently using node-zip and each time the process runs it generates an invalid ZIP file (as you can see from this Github issue). Is there another, better, Node.js option that will allow me to ZIP…
commadelimited
  • 5,656
  • 6
  • 41
  • 77
164
votes
9 answers

How to use Python's pip to download and keep the zipped files for a package?

If I want to use the pip command to download a package (and its dependencies), but keep all of the zipped files that get downloaded (say, django-socialregistration.tar.gz) - is there a way to do that? I've tried various command-line options, but it…
John C
  • 6,285
  • 12
  • 45
  • 69
155
votes
10 answers

Using R to download zipped data file, extract, and import data

@EZGraphs on Twitter writes: "Lots of online csvs are zipped. Is there a way to download, unzip the archive, and load the data to a data.frame using R? #Rstats" I was also trying to do this today, but ended up just downloading the zip file…
Jeromy Anglim
  • 33,939
  • 30
  • 115
  • 173
151
votes
9 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,621
  • 3
  • 13
  • 9
135
votes
4 answers

Python: Open file in zip without temporarily extracting it

How can I open files in a zip archive without extracting them first? I'm using pygame. To save disk space, I have all the images zipped up. Is it possible to load a given image directly from the zip file? For…
user2880847
  • 1,353
  • 2
  • 9
  • 4
132
votes
7 answers

Zip with list output instead of tuple

What is the fastest and most elegant way of doing list of lists from two lists? I have In [1]: a=[1,2,3,4,5,6] In [2]: b=[7,8,9,10,11,12] In [3]: zip(a,b) Out[3]: [(1, 7), (2, 8), (3, 9), (4, 10), (5, 11), (6, 12)] And I'd like to have In [3]:…
Jan Vorcak
  • 19,261
  • 14
  • 54
  • 90
131
votes
4 answers

Download multiple files as a zip-file using php

How can I download multiple files as a zip-file using php?
user213559
126
votes
6 answers

How to download/checkout a project from Google Code in Windows?

How do I download a ZIP file of an entire project from Google Code when there are no prepared downloads available? This is what I see on the checkout page: Command-line access Use this command to anonymously check out the latest project source…
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
125
votes
12 answers

How to [recursively] Zip a directory in PHP?

Directory is something like: home/ file1.html file2.html Another_Dir/ file8.html Sub_Dir/ file19.html I am using the same PHP Zip class used in PHPMyAdmin…
ed209
  • 11,075
  • 19
  • 66
  • 82
124
votes
10 answers

I didn't find "ZipFile" class in the "System.IO.Compression" namespace

I can't use "Zipfile" class in the name space "System.IO.Compression" my code is : using System; using System.IO; using System.IO.Compression; namespace ConsoleApplication { class Program { static void Main(string[] args) { …
Mohamed Kamal
  • 1,587
  • 2
  • 13
  • 16