@echo off
rem
rem	This command file compresses IDA database so that it will occupy
rem	less space on the disk and IDA will work faster.
rem
rem	To use this command file you should:
rem		- run IDA and exit with "Don't pack database"
rem		- run this command file on the *.ID0 file
rem		  for example: IDACOMP MYBASE.ID0
rem		- if you don't want to keep the database in the
rem		  unpacked form, run IDA and exit with "Pack..." 
rem
rem
cls
if %1. == . goto Usage
btcx %1 idabase.tmp
if errorlevel 1 goto Error
copy idabase.tmp %1
del idabase.tmp
goto Ex
:Usage
echo .
echo .  Usage: idacomp filename
echo .         where filename is *.id0 file
echo .
goto Ex
:Error
echo .
echo .  Compression failed.
echo .
pause
:Ex
