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
1069
votes
3 answers

How are zlib, gzip and zip related? What do they have in common and how are they different?

The compression algorithm used in zlib is essentially the same as that in gzip and zip. What are gzip and zip? How are they different and how are they same?
Abhishek Jain
  • 8,146
  • 4
  • 18
  • 34
622
votes
27 answers

How to create a zip archive of a directory in Python?

How can I create a zip archive of a directory structure in Python?
Martha Yi
  • 6,347
  • 3
  • 16
  • 8
582
votes
9 answers

Unzipping files in Python

I read through the zipfile documentation, but couldn't understand how to unzip a file, only how to zip a file. How do I unzip all the contents of a zip file into the same directory?
John Howard
  • 50,339
  • 21
  • 44
  • 63
431
votes
18 answers

What characters are forbidden in Windows and Linux directory names?

I know that / is illegal in Linux, and the following are illegal in Windows (I think) * . " / \ [ ] : ; | , What else am I missing? I need a comprehensive guide, however, and one that takes into account double-byte characters. Linking to outside…
Jeff
  • 12,441
  • 15
  • 46
  • 58
313
votes
17 answers

How can you zip or unzip from the script using ONLY Windows' built-in capabilities?

In Windows you can zip some files by right click → Send to → Compressed (zipped) folder And unzip by double clicking on the .zip file and extract the files. Is there a way to apply those abilities from a script (.bat file) without the need to…
Roee Gavirel
  • 17,192
  • 12
  • 58
  • 82
278
votes
8 answers

BitBucket - download source as ZIP

I know I can get the project through git clone command, but is there any way, how to download the project through the web interface from BitBucket.org? In the best way, I am looking for a way to download a project source as ZIP compress file.
user984621
  • 41,002
  • 66
  • 200
  • 371
254
votes
25 answers

How to create a zip archive with PowerShell?

Is it possible to create a zip archive using PowerShell?
Valentin V
  • 22,569
  • 28
  • 97
  • 147
248
votes
9 answers

What is a good Java library to zip/unzip files?

I looked at the default Zip library that comes with the JDK and the Apache compression libs and I am unhappy with them for 3 reasons: They are bloated and have bad API design. I have to write 50 lines of boiler plate byte array output, zip input,…
pathikrit
  • 29,060
  • 33
  • 127
  • 206
247
votes
7 answers

Create zip file and ignore directory structure

I need to create a zip file using this command: zip /dir/to/file/newZip /data/to/zip/data.txt This works, but the created zip file creates a directory structure mimicking the directory to the raw file. It is a lot of extra folders that I don't…
Jake
  • 3,376
  • 2
  • 13
  • 19
201
votes
10 answers

Creating a ZIP archive in memory using System.IO.Compression

I'm trying to create a ZIP archive with a simple demo text file using a MemoryStream as follows: using (var memoryStream = new MemoryStream()) using (var archive = new ZipArchive(memoryStream , ZipArchiveMode.Create)) { var demoFile =…
Marius Schulz
  • 14,538
  • 12
  • 58
  • 94
200
votes
21 answers

Fatal error: Class 'ZipArchive' not found in

I have a problem that I install 'Archive_Zip 0.1.1' on Linux server, but when I try to run the script to create the zip file it gives the fatal error Fatal error: Class ZipArchive not found in ... where I put the code $zip = new…
Parag Chaure
  • 2,523
  • 2
  • 17
  • 26
199
votes
5 answers

Is there a zip-like function that pads to longest length?

Is there a built-in function that works like zip() but that will pad the results so that the length of the resultant list is the length of the longest input rather than the shortest input? >>> a = ['a1'] >>> b = ['b1', 'b2', 'b3'] >>> c = ['c1',…
Mark Harrison
  • 267,774
  • 112
  • 308
  • 434
194
votes
1 answer

What is the difference between tar and zip?

What is the difference between tar and zip? What are the use cases for each?
mtk
  • 11,504
  • 15
  • 67
  • 104
184
votes
15 answers

Mac zip compress without __MACOSX folder?

When I compress files with the built in zip compressor in Mac OSX, it results in an extra folder titled "__MACOSX" created in the extracted zip. Can I adjust my settings to keep this folder from being created or do I need to purchase a third party…
Scott B
  • 35,095
  • 61
  • 148
  • 245
181
votes
7 answers

How do I ZIP a file in C#, using no 3rd-party APIs?

I'm pretty sure this is not a duplicate so bear with me for just a minute. How can I programatically (C#) ZIP a file (in Windows) without using any third party libraries? I need a native windows call or something like that; I really dislike the idea…
Esteban Araya
  • 27,658
  • 22
  • 99
  • 139
1
2 3
99 100