Jump to content

how to make a zip file


fiveworlds

Recommended Posts

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
Link to comment
Share on other sites

 

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

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.