ZipNFind

About ZipNFind
Using ZipNFind

About ZipNFind

ZipNFind is a tool for compressing text files and searching within the compressed files without decompressing them and in time proportional to the length of the compressed file rather than the original text.

ZipNFindis a Windows version of a tool developed by Paolo Ferragina, Alessandro Tommasi and Giovanni Manzini based on the work: deMoura, Navarro, Ziviani, Baeza-Yates, "Fast and Flexible Word Searching on Compressed Text", ACM Trans Info Syst 2000. For more information, see the homepage of the project.

The Windows version was developed by Iwona Bialynicka-Birula. It is based on the Huffword and CGrep libraries contained in the original project adapted for the Windows family of operating systems and enhanced with a graphical user interface.

Using ZipNFind

The directory tree

The directory tree located on the left of the main dialog displays all the files on your computer. The following icons denote different types of files:

Compressing files

To compress a single file, select an uncompressed file in the directory tree and press Compress. To compress all uncompressed files in a folder and its subfolders, select the folder in the directory tree and press Compress. The application will create compressed versions of the selected files while still keeping the original files. Using the Options button you may set compression options: the model (spaceless or not) and the auxiliary pointer distance in the latter case.

Note: This compression mechanism is effective when applied to large text files. If applied to different file types or to small files, the resulting archive might not be smaller than the original.

Decompressing files

To decompress a single file, select a compressed file in the directory tree and press Decompress. To decompress all compressed files in a folder and its subfolders, select the folder in the directory tree and press Decompress. The application will create expanded versions of the selected files while still keeping the compressed versions.

Removing redundant files

To remove the compressed version of a file, select the file pair in the directory tree and press Remove compressed files. To remove all compressed files (which have corresponding originals) in a folder, select the folder in the directory tree and press Remove compressed files.

To remove the uncompressed version of a file, select the file pair in the directory tree and press Remove original files. To remove all uncompressed files (which have corresponding compressed versions) in a folder, select the folder in the directory tree and press Remove original files.

Note: The application will only allow you to remove files which have a corresponing compressed or uncompressed version so as to ensure no loss of data.

Searching within archives

To search for a word within one or more archives, type the word in the Search word field, choose the number of allowed errors (the default is 0 - only exact matches are listed) and press Search. If a single compressed file is selected in the directory tree, the application will search that file. If a folder is selected it will search all compressed files in this folder and subfolders.

Note: Only compressed (.hwz) files may be searched.

Search results are listed in the field below. Each match in the list is accompanied by the name of the file in was found in, its position in the file and context (the 6 words around it).

Note: The search functionality requires the tool agrep to be installed on your system and to be accessible to the WinCS program through the command 'agrep'. You may download agrep from the official agrep site. Make sure the location of the executable agrep.exe is in the path.

Library output

The output of the Huffword and CGrep procedures is stored in the log file ZipNFind.log. You may open this file, by pressing View log file.