Copyright: Copyright © 1997, TurboPower Software Company


Contents

The TurboPower Zip demonstration program (TPZip) is a comprehensive compression/decompression program that uses many of the capabilities of Abbrevia - the new PKZIP compatible compression library from TurboPower Software. You can use TPZip to view existing archives, extract files from archives, or create new archives.

Introduction

Extracting Files

Creating an Archive

The TPZip Menu

Popup Menu

Drag-and-Drop Operations


Creating an Archive

It is also easy to create an archive. Click on the Open button on the toolbar to display the Open a Zip Archive dialog. If you enter the name of a new file and click Open, a message tells you that the archive does not exist and asks if you would like to create it. Click Yes. Now you can add files to your new archive. Use the file browser to find a file and drag it to the outline. The file is added to the archive. You can add as many files as desired to the archive (up to 65,535).

If you add a file to the archive by mistake and need to delete it, right-click on the file and choose Delete from the menu.


Drag-and-Drop Operations

TPZip fully supports drag-and-drop operations. In TPZip, you can extract files by dragging them from the outline to the file browser. Likewise, you can add files to the archive by dragging them from the file browser to the outline.

The Outline can also accept files dropped onto it using the standard Windows drag-and-drop operations. This means that you can drag files from the Windows Desktop or Windows Explorer to add them to an archive.


Extracting Files

It is easy to extract a file from an archive. In the browser, navigate to the desired directory for extraction. Click and drag any file in the outline to the listbox at the bottom of the file browser and the file is extracted into that directory.

Another way to extract a file is to right-click on it in the outline. A popup menu is displayed and you can select Extract. The Extract Selected File dialog is displayed.

To extract the file to a specific directory, simply navigate to the directory and click OK. If the directory does not exist, navigate to its parent directory, use the Create Directory button to create a new directory, navigate to the new directory, and then click OK. The file is extracted.

You can also use the path information stored in the archive to choose the directory. The edit control at the top of the dialog shows the path information that is stored in the archive for the selected file. If the Restore Path checkbox is not checked (the default), the file is extracted to Target Directory and the path information stored in the archive is ignored. In the example shown above, the file would be extracted to E:\ABBREVIA\DOC\CHAPTER1.WMF. If you check the Restore Path checkbox, the file is extracted to the directory indicated by the path information stored in the archive, relative to Target Directory. In this example, if Restore Path were checked, the file would be extracted to E:\ABBREVIA\DOC\ABBREVIA\DOC\CHAPTER1.WMF, which is probably not exactly what you would like. To avoid  that, you could navigate back up the directory path to E:\, so that it becomes the Target Directory.

The setting of Create Directories is used only if Restore Path is checked. If Create Directories is checked and the directory indicated in the path information stored in the archive does not exist, it is created. If Create Directories is not checked and the directory indicated in the path information stored in the archive does not exist, the file is not extracted.

To extract all of the files (or multiple files) from the archive, use the Items|Extract Files menu option or the Extract Files button on the toolbar. The Extract Files With FileMask dialog is displayed.

The default file mask is *.*, which means that all files will be extracted from the archive. You can modify the file mask to extract any desired group of files. To extract the files to a specific directory, simply navigate to the directory and click OK. If the directory does not exist, navigate to its parent directory, use the Create Directory button to create a new directory, navigate to the new directory, and then click OK. The files are extracted.

If the Restore Path checkbox is not checked (the default), the files are extracted to Target Directory and the path information stored in the archive is ignored. In the example shown above, the files would be extracted to E:\ABBREVIA\DOC. If the Restore Path checkbox is checked and path information is stored in the archive for a file, the file is extracted to the directory indicated by the path information, relative to Target Directory.

The setting of Create Directories is used only if Restore Path is checked. If Create Directories is checked and the directory indicated in the path information stored in the archive does not exist, it is created. If Create Directories is not checked and the directory indicated in the path information stored in the archive does not exist, the file is not extracted.


File Menu

From the File menu, you can open, save, or close an archive, convert it to a self-extracting archive, or exit the application.

Open...

You can open an existing PKZIP-compatible archive or a self-extracting archive (the Abbrevia components can operate on either type of archive transparently). If you select an existing archive, the contents of the archive are displayed in the outline on the left. If you specify an archive that does not exist, a new archive is created.

Save

The Save menu option updates the archive.

TPZip updates the archive when this menu option is used or when the archive is closed (for example, when a different archive is opened).

Close

The Close option closes the current archive.

Convert (to .exe)

The Convert option converts an archive to a self-extracting archive by attaching it to the end of an executable (called a stub) that is designed specifically for this purpose. Sample stubs (including the one that is used when you choose this option) are provided with Abbrevia, or you can build your own.

Exit

This option terminates TPZip.


Help Menu

Contents

View the TPZip help file.

TurboPower on the Web

Point your web browser to TurboPower Software.

Abbrevia on the Web

Learn more about Abbrevia.

Send Mail to TurboPower

Get more info from TurboPower Software.

About...

Display information about TPZip, Abbrevia, and TurboPower.


Introduction

When you run the TPZip program, the main window is displayed:

The right half of the window is a file browser. You can use it to navigate to any directory and then click on a ZIP file in the lower list box and drag it to the large box on the left. The contents of the ZIP file are displayed in an outline on the left side of the window.

You can also open a ZIP file by double-clicking on it or by using the File|Open menu option or the Open button on the toolbar. If you use the menu option or the toolbar button, the Open a Zip Archive dialog is displayed so you can navigate to the desired file.

For each item in the archive, the outline displays its name, path (if path information was saved in the archive), and information about the file. You can choose what information is displayed by using the View|Attributes menu item. You can also change the "look" of the outline by using the View|Style menu item. See View Menu" for more information.

TPZip uses Abbrevia’s progress events to update the two gauges at the bottom of the window. The gauge on the left is attached to the OnArchiveProgress event, so it shows the progress for the entire archive. The gauge on the right is attached to the OnArchiveItemProgress event, so it shows the progress for the current archive item (file). The lower right panel is also updated using the OnArchiveItemProgress event.

TPZip supports the WM_MOUSEWHEEL event generated by the Microsoft IntelliMouse under certain implementations of Win32. Rolling the mouse wheel changes the current SelectedItem in the Outline and also fires the OnMouseWheel event.


Items Menu

Using the Items menu, you can Add, Delete, Extract, or Freshen files that match a specified FileMask.

Add Files...

The Add Files option adds files to the current archive.

Delete Files...

The Delete Files option deletes files from the current archive.

Extract Files...

The Extract Files option extracts files from the current archive.

Freshen Files...

The Freshen Files option freshens files in the current archive.


Popup Menu

If an archive is loaded, you can right-click on any archive item to display a popup menu. If you right-click on a directory or a file attribute (such as Compressed Size), the popup menu is not displayed. From the popup menu, you can Delete, Extract, Freshen, Move (i.e., change the archive item’s stored filename), or Run the file (i.e., extract the file to a temporary directory and launch its associated application).


Preferences Menu

You can modify the behavior of TPZip by using the Preferences menu.

Confirmations

TPZip allows you to enable confirmations of common operations. These can be useful for drag-and-drop and wild card operations.

Compression Method To Use

The choices for compression method are Store, Deflate, and Best. If you choose Best (the default), TPZip attempts to use Abbrevia’s most effective compression technique (the deflate method); however, that method is abandoned if the resulting file would be smaller if it were simply stored. If you select Store or Deflate, TPZip uses the selected technique, regardless of the resulting file size.

Deflation Options

The deflation options allow you to select varying tradeoffs between compression and speed. The choices are Maximum (most compression, slowest speed), Normal, Fast, and Super Fast (least compression, fastest speed). Normal deflation is the default.

Extract Options

The Extract Options control what happens as files are extracted from an archive. The Create Directories option controls whether Abbrevia is allowed to create directories as needed to extract the files. The Restore Path option controls whether relative file path information is restored.

Password...

Abbrevia encryption and decryption is fully compatible with PKZIP. Use the Password option to supply a password for extracting an encrypted file, or to encrypt a file when it is added or freshened. Encryption is automatic - if the Password is set, added files are encrypted. When a Password is entered, a key icon is displayed on the status bar at the upper right of the main window. If you try to extract an encrypted file from an archive and don’t supply a Password (or supply an invalid one), TPZip prompts you for a Password using the OnNeedPassword event. This event is repeated based on the value of the PasswordRetries property.

Store Options

The Store Options control what happens when files are added to an archive. The Recurse Tree option controls whether the directory tree is recursed during add operations. The Remove Dots option controls whether relative path information is removed - adding ‘..\README.TXT’ to an archive would result in a stored filename of ‘README.TXT’ if the RemoveDots options is checked. The Strip Path option controls whether path information is retained in the stored file.


The TPZip Menu

File Menu

Preferences Menu

View Menu

Items Menu

Help Menu


View Menu

Attributes

Along with compressed data, PKZIP archives store a wealth of information about each file in the archive. The Attributes option allows you to select which attributes are displayed.

Font...

The Fonts option invokes the Font dialog, which allows you to select the font for the components on the TPZip main form.

Style

The Style option controls the look of the outline.

If "Hierarchy" is checked (the default), the archive contents are displayed as if the archive is a virtual drive (files contained within folders). If Hierarchy is not checked, each item’s file name is displayed with the path information included.

If "Only Text" is checked, no pictures or glyphs are displayed.

If "+/-" is checked, a + or - is displayed to the left of each item in the hierarchy. If the item is collapsed, a + is displayed. If the item is expanded, a - is displayed. You can toggle between collapsing and expanding the item by double-clicking on the + or -.

If "Glyphs" is checked, glyphs are displayed to the left of each item in the outline. A folder glyph is displayed for directories, a page glyph is displayed for items in the archive, and a zipper glyph is displayed for attributes.

If "+/- and Glyphs" is checked, both +/- boxes and glyphs are displayed.

If "Only Tree" is checked, lines indicating the tree structure are displayed.

If "Tree and Glyphs" is checked, both the tree structure and glyphs are displayed.