public static void main(String[] args) throws IOException {
        if (args.length != 2) {
            System.err.println("Incorrect parameters.\n");
            System.err.println(getHelp());
            return;
        }

        switch (args[0]) {
            case "-c":
                compress(new File(args[1]), new File(args[1] + ".mz78"));
                break;
            case "-d":
                File destinationFile;
                if (args[1].endsWith(".mz78"))
                    destinationFile = new File(args[1].replaceAll(".mz78$", ""));
                else
                    destinationFile = new File(args[1] + ".raw");
                decompress(new File(args[1]), destinationFile);
                break;
            default:
                System.err.println("Incorrect parameters.\n");
                System.err.println(getHelp());
        }
    }