Zappo Decompression DLL for DarkBasic Pro
=========================================

Description:
------------
This is a simple DLL wrapper for the Windows built-in decompression
system. I am sure you will have seen lots of files ending with an
underscore on your Windows installation CD (e.g. file.ex_) and in
other install packages. These files are compressed using Microsofts
'compress.exe' command which by default uses a flavour of the LZX
compression algorithm. This DLL lets you decompress files from
inside your DarkBasic Pro programs.

Installation:
-------------
Copy the 'ZappoDecompress.dll' file to the 'plugins-user' folder of
your DarkBasic Pro installation, usually something like:
C:\Program Files\Dark Basic Professional\Compiler\plugins-user

Copy the 'keywords_zappodecompress.ini' file to the 'keywords'
folder of the DarkBasic Pro Editor directory, usually like:
C:\Program Files\Dark Basic Professional\Editor\Keywords

Run or restart your DarkBasic Pro IDE and give it a try!

Usage:
------
There is only one command which takes the form:
   Zappo Decompress("filename")
This will decompress the given archive file to the current
directory. It will automatically pull out the original filename
from the file so you don't need to worry about that. It returns a
zero if the archive could not be found. A quick example would be

if Zappo Decompress("testpic.bm_")
   if file exist("testpic.bmp")
      load bitmap "testpic.bmp"
      delete file "testpic.bmp"
   else
      print "Decompression unsuccessful."
   endif
else
   print "Archive not found."
endif

This snippet will decompress the archive 'testpic.bm_' and then
open the uncompressed 'testpic.bmp' if it exists. Otherwise it will
report the error.

Compressing your own files:
---------------------------
You can compress your own files using the Microsoft 'compress.exe'
program. Drop to a DOS prompt (e.g. click the 'Start' button, click
'Run' and type 'cmd') and browse to your desired folder. On the
command line type:
   compress -R filename
Don't forget the -R so that it stores the original name inside the
archive, and don't forget to type the extension of the file. If the
command is not on your machine you can download it as part of the
Windows 2003 Resource Kit, which also works fine in XP:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en

Once completed you should see a compressed version of your file
with a filename ending in an underscore, e.g. myfile.bmp would
become myfile.bm_

NOTE: Although the 'compress.exe' program does allow you to create
MS-ZIP files too, they will not work with this DLL. I may add
support for this later if people want it.

Usage Restrictions:
-------------------
You may use this DLL within your DarkBasic Pro creations for
commercial and noncommercial purposes. I would appreciate a
mention in the credits, but it is not essential. All I do ask is
that you let me know if you release anything which uses it.

The DLL remains copyright to me (Neil King) and you must not pass
it off as your own work. You may not sell this DLL or distribute
it without my authorisation. I hope you find it useful.
Contact: darkbasic@contactking.com