Zipping/Unzipping Guides

(ZT) Here you can find answers to frequently asked questions regarding the original version of Zoo Tycoon and its expansion packs.
Post Reply
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Zipping/Unzipping Guides

Post by Jay »

I tested a number of zipping/unzipping programs to see which I felt was the best for ZT related activities.

This paragraph is for those interested in what was tested. The programs I looked at were 7-zip, advancecomp, IZArc, peazip, TkZip, tugzip, unwind, UnxUtils, unz552xn, unz600xn, upx, the Windows XP built-in, winrar, WiZ, zip300xn, and ZipCentral. Although I did not test them specifically, I have also used other programs, such as pkzip and winzip. I had 14 different tests: open animals.ztd; test animals.ztd; extract animals.ztd into specified folder; zip into animals.ztd; extract 2 scenery ".ztd" files into same folder; zip 2 scenery objects into a combined ".ztd" with maximum compression and without separate directory entries and test ingame; zip very large building into ".ztd" with maximum compression and without separate directory entries and test ingame; compress large ".zoo"; view uncompressed size, compressed size, date, time, CRC, and separate directory entries; edit ".ucs" and ".ani" within a scenery ".ztd"; extract specific ".ztd" from a ".zip" into a specific folder; test a ".zip" that uses a compression method newer than v2.0; attempt to extract as much as possible from a corrupted ".zip"; delete files and directory entries from a ".ztd". No program passed all 14 tests. Sometimes it looked like something passed until one looked at the details. However, I am able to give a recommendation.

I recommend using 7-zip for most things. It is certainly the most flexible of any zipping/unzipping program. It is free and open source. The few things it does not do are minor. The following are the steps to download and install 7-zip in Windows XP. The steps would be similar in other versions of MS Windows as well. Later posts will say how to do various zipping/unzipping tasks.

1. Go to the web site: http://www.7-zip.org

2. Click "Download" that is next to ".exe". This will go to a new web page at sourceforge.net. If the download does not start on its own, click "direct link".

3. In the window that comes up, click "Save".

4. A "Save As" window will appear. You can download the file anywhere you like. I have a "downloads" folder in my C: drive where I put the downloads. Some people like to have a Downloads folder in their "user" folder. (This is common in Vista.) In any case, remember where it is being saved and click "Save".

5. When the download finishes, click "Close" in the download window.

6. Use My Computer (usually in the start menu) or Windows Explorer (usually in start->All Programs->Accessories) to go to where you downloaded 7-zip.

7. Double click the 7-zip program name. Its name will start with "7z".

8. If a window comes up saying "The publisher could not be verified. Are you sure you want to run this software?", click "Run".

9. In the Setup window click "Install".

10. After 7-zip is installed, click "Finish".

-----

The above guide may be copied to any web site. But, except for formatting changes, the contents may not be changed, including the credits. If there are any suggestions for changes, please post them at Zookeeper's Lounge. That is where this guide will be kept up-to-date.

Zipping/Unzipping Guides are in the FAQs section at the Zookeeper's Lounge web site:
http://www.lunamanar.com/zklounge/index.php
- written by Jay
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Post by Jay »

Testing ".zip" and ".ztd" Files Using 7-zip

Sometimes when downloading a file, the download might stop early for various reasons, and it might not be obvious that the download stopped early. So it is always important to test a download, when possible, to make sure it is not corrupted. Testing is easy to do using 7-zip for compressed files, such as ".zip" and ".ztd" files. 7-zip can even test other types of compression formats as well. In addition, some ".exe" files are actually compressed files, which 7-zip can test. 7-zip has another advantage over other compression programs: it generally does not care what the extension is. Instead, it looks inside the file to see if the file uses a compression format it understands. That is why it is able to test ".ztd" files, which use the ".zip" compression format. Here are the steps to test a file using 7-zip:

1. In My Computer or Windows Explorer, right-click on the file you want to test. In the context menu that appears, move the mouse cursor to "7-Zip" and click "Test archive".

2. 7-Zip will test the file, if it can. Sometimes its testing window is behind other windows on the screen. In that case, either click the "Testing" task in the task bar at the bottom of the screen or minimize the other windows on the screen. If the tested file is a compressed file and is not corrupted, 7-zip's Testing window will say "There are no errors". Click "OK" in 7-zip's Testing window to close the window.

-----

The above guide may be copied to any web site. But, except for formatting changes, the contents may not be changed, including the credits. If there are any suggestions for changes, please post them at Zookeeper's Lounge. That is where this guide will be kept up-to-date.

Zipping/Unzipping Guides are in the FAQs section at the Zookeeper's Lounge web site:
http://www.lunamanar.com/zklounge/index.php
- written by Jay
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Post by Jay »

Extracting Files from Inside ".zip" or ".ztd" Files Using 7-zip

7-zip allows many different ways to extract the contents of ".zip" and ".ztd" files. I find the easiest and safest way is to have 7-zip put the contents in a folder based on the name of the ".zip" or ".ztd". Then I can copy things from that folder or edit things in that folder, eventually deleting the folder when I am done. Here are the steps to have 7-zip extract the contents into a folder based on the name of the ".zip" or ".ztd":

1. In My Computer or Windows Explorer, right-click on the ".zip" or ".ztd" file from which you want to extract its contents. In the context menu that appears, move the mouse cursor to "7-Zip" and click 'Extract to "..."'. The "..." will be the name of the ".zip" or ".ztd" file, without the ".zip" or ".ztd".

2. The files will be extracted and a folder will appear in the My Computer or Windows Explorer window. For example, if you were extracting the contents of ZT-utils.zip, a folder called "ZT-utils" will appear with a picture of a folder next to it. You can double click this folder to go inside of it and see what is there.

-----

The above guide may be copied to any web site. But, except for formatting changes, the contents may not be changed, including the credits. If there are any suggestions for changes, please post them at Zookeeper's Lounge. That is where this guide will be kept up-to-date.

Zipping/Unzipping Guides are in the FAQs section at the Zookeeper's Lounge web site:
http://www.lunamanar.com/zklounge/index.php
- written by Jay
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Post by Jay »

Putting Files into a New ".zip" or ".ztd" Using 7-zip

7-zip allows many different ways to create new ".zip" and ".ztd" files. 7-zip will also compress the files in the process, meaning they will be smaller, and will usually be smaller than most other compression programs can do. 7-zip also can compress ".zoo" files that it puts inside ".zip" files, which is something not all compression programs do, since they incorrectly believe ".zoo" files are an older compression format. I find it easiest to create new ".zip" and ".ztd" files via a My Computer or Windows Explorer window. Here are the steps to do so:

1. Use a My Computer (usually in the start menu) or Windows Explorer (usually in start->All Programs->Accessories) window to go to the folder that contains the file, files, folder, or folders you want to put into a ".zip" or ".ztd".

2. If you are putting more than one file or folder into a ".zip" or ".ztd", press the "Ctrl" key and, while still pressing the "Ctrl" key, click on each file and folder that you want to put into a ".zip" or ".ztd". The files and folders that you clicked will be highlighted. Then release the "Ctrl" key.

3. If you are putting only one file or folder into a ".zip" or ".ztd", right-click on that file or folder. If you are putting more than one file or folder into a ".zip" or ".ztd", right-click one of the highlighted files or folders you clicked in the previous step. In either case, a context menu will appear. Move the mouse cursor to "7-Zip" and click "Add to archive...". An "Add to Archive" window will appear.

4. Set "Archive format" to "Zip" (which is the only format understood by ZT), "Compression level" to "Ultra", "Compression method" to "Deflate" (which is the only method understood by ZT), "Dictionary size" to "32 KB", "Word size" to "258", and type "fb=258 pass=15 tc=off" (without the quotation marks) in the "Parameters:" box. This will cause 7-zip to try to make the file as small as possible that ZT will still understand. 7-zip will remember these settings in the future. If you do not want to use the suggested "Archive" name, type a new one in the "Archive" box. The name should end with either ".zip" or ".ztd". Also make sure it is a name that is not in the folder already, otherwise 7-zip will attempt to add things into the file that is already in the folder.

5. Click "OK" in the "Add to Archive" window. 7-zip will create the new ".zip" or ".ztd" and put it in the same folder. The ".zip" or ".ztd" can then be copied elsewhere.

-----

This guide was edited 2016-02-12 by Jay to add "tc=off" in step 4, to get slightly better compression in newer versions of 7-zip.

The above guide may be copied to any web site. But, except for formatting changes, the contents may not be changed, including the credits. If there are any suggestions for changes, please post them at Zookeeper's Lounge. That is where this guide will be kept up-to-date.

Zipping/Unzipping Guides are in the FAQs section at the Zookeeper's Lounge web site:
http://www.lunamanar.com/zklounge/index.php
- written by Jay
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Post by Jay »

Combining ".ztd" Files Using 7-zip

There are many ways to combine ".ztd" files, even when using 7-zip. The advantage of using 7-zip over other compression programs is that it will generally make a smaller file. For the most part, there are no restrictions to what ".ztd" files may be combined. Whether or not ".ztd" files are combined, one has to make sure no ZT Purchase Menu has more than 3000 objects. As for me, I do not combine interesting animals or ".ztd" files that contain multiple types of objects. So I combine things of the same type and name the combined ".ztd" appropriately, such as: UserFences.ztd, UserRocks.ztd, UserFoliage.ztd, UserPaths.ztd, UserNonlivingAnimals.ztd, UserNonspecialAnimals.ztd, UserShelters.ztd, UserToys.ztd, UserStructures.ztd, and UserScenery.ztd. The following steps assume Windows XP is used. Other versions of MS Windows will be similar.

1. Click the "start" button at the bottom left of the screen. Click "My Computer".

2. In the "My Computer" window, double-click "C:". Make sure there are no "2extract" or "2compress" folders in the window. If there are, delete them or rename them, since we want empty "2extract" and "2compress" folders when we start. If the arrows next to "File and Folder Tasks" are pointing down, click on the arrows to show more options. Click "Make a new folder". Type "2extract" and press the "Enter" key to name the new folder.

3. Double-click the "2extract" folder to go into it.

4. Click the "start" button at the bottom left of the screen. Click "My Computer". You can move this "My Computer" window around on your screen by moving the mouse cursor to "My Computer" at the top of the window, pressing the left mouse button down, moving the mouse, and then releasing the left mouse button. Ideally you want to see the "My Computer" window and at least a part of the "2extract" window at the same time. Use this "My Computer" window to go to where the ".ztd" files are that you want to combine. For example, if the files you want to combine are in ZT's dlupdate (or Updates) folder, double-click "C:", double-click "Program Files", double-click "Microsoft Games", double-click "Zoo Tycoon", and double-click "dlupdate" (or "Updates").

5. For each ".ztd" you want to combine, right-click on the ".ztd", click "Copy" in the context menu, right-click in the white space on the right side of the "2extract" window, and click "Paste". (If you are getting the files from ZT's dlupdate or Updates folder, you might want to use "Cut" instead of "Copy". That will move the files instead of creating copies of them, which means they will no longer be in ZT's folders, which is what you will want when the combined ".ztd" is in ZT's folders.)

6. Once the "2extract" folder contains all of the ".ztd" files you want to combine, click "Edit" in the "2extract" window and click "Select All".

7. Right-click on one of the highlighted ".ztd" files in the "2extract" window. In the context menu that appears, move the mouse cursor to "7-Zip" and click "Extract files...".

8. In the "Extract" window that appears, change what is in the "Extract to" box to "C:\2compress". Make sure "Path mode" is set to "Current pathnames". Then click "OK". 7-zip will extract the files. If multiple ".ztd" files contain the same file name, a "Confirm File Replace" window appears. Sometimes this means there is a conflict; sometimes it is okay. The "Confirm File Replace" will give the sizes and modified dates and times of the files. If the sizes, dates, and times match, then it is probably okay. You can click "Yes" in that case for each file name where they match. If the sizes, dates, or times are different, there is probably (but not necessarily) a conflict.

9. When 7-zip has finished extracting the files, click "Back" in the "2extract" window. Then double-click "2compress". The extracted files and folders will be shown and the window will now be called "2compress". In the "2compress" window, click "Edit" and click "Select All". All files and folders in the window will be highlighted.

10. Right-click one of the highlighted files or folders in the "2compress" window. A context menu will appear. Move the mouse cursor to "7-Zip" and click "Add to archive...". An "Add to Archive" window will appear.

11. Set "Archive format" to "Zip" (which is the only format understood by ZT), "Compression level" to "Ultra", "Compression method" to "Deflate" (which is the only method understood by ZT), "Dictionary size" to "32 KB", "Word size" to "258",and "Parameters" to "fb=258 pass=15 tc=off". This will cause 7-zip to try to make the file as small as possible that ZT will still understand. 7-zip will remember these settings in the future. Type a new ".ztd" file name (such as UserScenery.ztd) in the "Archive" box.

12. Click "OK" in the "Add to Archive" window. 7-zip will create the combined ".ztd" and put it in the same folder. After the combined ".ztd" is created, right-click it and click "Copy". Click on the other "My Computer" window and go to where you want to put the combined ".ztd". Most likely you want to put the combined ".ztd" in ZT's dlupdate or Updates folder. When the "My Computer" window is at the folder where you want the combined ".ztd", right-click in the white space on the right side of that window and click "Paste" in the context menu that appears.

13. At this point, I usually test the combined ".ztd" in ZT. When I am convinced it is working the same way as the individual ".ztd" files were working, I click "Back" in the "2compress" window, click the "2extract" folder, press the "Del" key, click "Yes" in the confirmation window, click the "2compress" folder, press the "Del" key, click "Yes" in the confirmation window, and delete the "2extract" and "2compress" folders from the Recycle Bin.

-----

This guide was edited 2016-02-12 by Jay to add "tc=off" in step 11, to get slightly better compression in newer versions of 7-zip.

The above guide may be copied to any web site. But, except for formatting changes, the contents may not be changed, including the credits. If there are any suggestions for changes, please post them at Zookeeper's Lounge. That is where this guide will be kept up-to-date.

Zipping/Unzipping Guides are in the FAQs section at the Zookeeper's Lounge web site:
http://www.lunamanar.com/zklounge/index.php
- written by Jay
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Post by Jay »

Shrinking the Size of Most ".ztd" and Some ".zip" Files

7-zip will make smaller ".ztd" and ".zip" files than most other programs. Nevertheless, most ".ztd" and some ".zip" files it creates can be made even smaller. When 7-zip adds something like "objects/12345678/idle/idle.ani" into a ".ztd", it actually creates entries for "objects/", "objects/12345678/", and "objects/12345678/idle/" in addition to "objects/12345678/idle/idle.ani". These extra entries are unnecessary and ZT will run a tiny bit slower (possibly not even noticeable) as it sees them and skips them. Many other compression programs do this as well. In addition, sometimes an older version of the 7-zip algorithm can make some small files even smaller. It is not necessary to do anything about these. But if you want to try, there are 2 free and open source programs that can be used. The zip program from http://infozip.sourceforge.net has the ability to delete any unnecessary directory entries and the advzip program from http://advancemame.sourceforge.net/comp-readme.html has the ability to see if a ".ztd" or ".zip" can be reduced further via the older 7-zip algorithm. Since these programs can be difficult to use, I put them in a ".zip" with a tiny program of my own to make them somewhat easier to use. Here is that shrink.zip:

Download shrink.zip here; size is 340 KB.

The programs can be used with any ".ztd" or ".zip", no matter what program was used to create them. Here are the steps to use them:

1. The tiny program I wrote expects the files to be in C:\utils. So shrink.zip needs to be extracted there, which only needs to be done once. Here is how to do that extraction using 7-zip and Windows XP: Click the "start" button at the bottom left of the screen, click "My Computer", go to where you downloaded the above shrink.zip, right-click on shrink.zip, move the mouse cursor to "7-Zip", click "Extract files...", change what is in the "Extract to" box to "C:\utils", and click "OK".

2. In My Computer or Windows Explorer, right-click on the ".ztd" or ".zip" file that you want to try to shrink. In the context menu that appears, click "Open With". In the future, there will be a "shrink" option to click on. The first time, though, the following steps are needed: Click "Choose Program...", click "Browse...", click "My Computer", double-click "C:", double-click "utils", click "shrink.bat", click "Open", make sure the box is empty next to "Always use the selected program to open this kind of file", click "shrink", and click "OK". In either case, the file will be reduced in size, if the programs were able to do so. Once I had a ".ztd" changed to a ".tmp", probably because of a timing problem within MS Windows. If this happens, change the ".tmp" back to ".ztd" or ".zip".

-----

The above guide and shrink.zip may be copied to any web site. But, except for formatting changes, the contents may not be changed, including the credits. If there are any suggestions for changes, please post them at Zookeeper's Lounge. That is where this guide will be kept up-to-date.

Zipping/Unzipping Guides are in the FAQs section at the Zookeeper's Lounge web site:
http://www.lunamanar.com/zklounge/index.php
- written by Jay
Post Reply