Jump to content

how to make a zip file

Featured Replies

By using one of the many free and / or commercial tools (e.g. WinZip or 7Zip for Windows, zip for linux, etc.). Or by selecting "Compress directory" (or whatever the option is) in windows.

Edited by Strange

Right-click on Windows Desktop > Select Compressed Zipped Folder > Copy and paste files into it.

Edited by StringJunky

You ask how to make a zip file routine then say you want to make your own? Why reinvent the wheel?

If you look here you will see the source code download link for 7Zip. No idea what you need to open it with though..Notepad just gives lots of funny symbols.. It can probably be interpreted to a higher language with the right software.

Edited by StringJunky

 

Yes it is: "The .ZIP file format was released into the public domain"

http://en.wikipedia.org/wiki/Zip_%28file_format%29

 

There are plenty of free implementations and, of course, libraries for most languages. For example (just the first I found, no recommendation intended): https://code.google.com/p/miniz/

Edited by Strange

  • Author

Yes but subsequent versions may not be

 

If you look here you will see the source code download link for 7Zip. No idea what you need to open it with though.

 

That's it thanks

Edited by fiveworlds

Yes but subsequent versions may not be

 

That makes no sense.

 

Do you want to implement your own program implementing the zip format, in which case use one of the hundreds of (free, open source) libraries.

 

Or do you want to invent your own archive/compression format? (In which case, you are wasting your time.)

 

Or do you just want an alternative? In which case use tar + one of the many possible compression formats (gz, bz, etc).

Edited by Strange

  • Author
Do you want to implement your own program implementing the zip format, in which case use one of the hundreds of (free, open source) libraries.

 

No I just wanted to know how the existing one worked because I was asked how to make a zip file and thought about it and realized that I actually had no idea I just used 7zip the whole time

Edited by fiveworlds

No I just wanted to know how the existing one worked because I was asked how to make a zip file and thought about it and realized that I actually had no idea I just used 7zip the whole time

Working through that one will probably give you some idea.

How do I make a zip file?

If you're thinking from programmers point of view, and asking for code, .NET Framework has functions that can be used for this task:

https://msdn.microsoft.com/en-us/library/system.io.compression.zipfile%28v=vs.110%29.aspx

(it's part of Windows OS)

 

You ask how to make a zip file routine then say you want to make your own? Why reinvent the wheel?

StringJunky, c'mon!

 

It's often needed functionality for programmers.

f.e. you have life update routine. Program periodically is connecting to your server checking for update, if it's available, downloading it, and it could be ZIP archive to minimize size.

So it must be unzipped by program, behind user back, transparently.

Then files from unzipped folder installed in program folder, and restart application..

No I just wanted to know how the existing one worked because I was asked how to make a zip file and thought about it and realized that I actually had no idea I just used 7zip the whole time

 

There's really quite a lot to it.

 

http://en.wikipedia.org/wiki/Data_compression

 

can probably give you some insight.

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.