#include <ccmio.h>
#include <ccmioutility.h>
#include <iostream>

using namespace std;

int main( int argc, char *argv[] )
{
    if (argc < 2)
    {
	cout << "Usage:  " << argv[0] << " file.ccm [file1.ccm ...]" << endl;
	return(1);
    }

    for (int i = 1;  i < argc;  ++i)
    {
	if (CCMIOCompress(NULL, argv[i]) != kCCMIONoErr)
	    cout << "Error compressing '" << argv[i] << "'; original file unchanged." << endl;
    }

    return(0);
}
