Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted (edited)

 

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
Posted (edited)

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
Posted (edited)

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
Posted (edited)
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
Posted

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.

Posted

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

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.