// ----------------------------------------------------------
        static void Main(string[] aArgs)
        {
            // create options
            var options = new Options();
            if (!ParseArgs(aArgs, options)) {
                PrintUsage();
                Environment.Exit(1);
            }

            // read defs
            var defsReader = new DefsReader();
            var defs = defsReader.ReadDefs(options);

            // convert
            if (options.isInFileXml) {
                if (!options.outputBinary) {
                    new XmlMinimizer().Minimize(options, defs.rootDef);
                } else {
                    new Xml2Bin().Convert(options, defs.rootDef);
                }
            } else {

            }

            // to prevent closing console window
            Console.WriteLine("Done.");
            Console.ReadKey(true);
        }
        // ----------------------------------------------------------
        static void Main(string[] aArgs)
        {
            // create options
            var options = new Options();

            if (!ParseArgs(aArgs, options))
            {
                PrintUsage();
                Environment.Exit(1);
            }

            // read defs
            var defsReader = new DefsReader();
            var defs       = defsReader.ReadDefs(options);

            // convert
            if (options.isInFileXml)
            {
                if (!options.outputBinary)
                {
                    new XmlMinimizer().Minimize(options, defs.rootDef);
                }
                else
                {
                    new Xml2Bin().Convert(options, defs.rootDef);
                }
            }
            else
            {
            }

            // to prevent closing console window
            Console.WriteLine("Done.");
            Console.ReadKey(true);
        }