import java.util.*;
import java.io.*;

public class FFT
{
    public static final String DATA_FILE = "data.txt";

    public static void main (String[] args)
    {
        boolean debug = false;
        boolean verify = false;

        for (int i = 0; i < args.length; i++)
        {
            if ("-help".equals(args[i]))
            {
                System.out.println("Usage: [-verify] [-debug] [-help]");
                System.exit(0);
            }

            if ("-debug".equals(args[i]))
                debug = true;

            if ("-verify".equals(args[i]))
                verify = true;
        }

        if (verify)
        {
            Verifier theVerifier = new Verifier(debug);
            boolean verified = theVerifier.verify();

            if (verified)
                System.out.println("Verified ok.");
            else
                System.out.println("Verify failed.");
        }
        else
        {
            /*
             * Open the data file and read it in.
             */

            BufferedReader reader = null;
            String line = null;

            try
            {
                reader = new BufferedReader(new FileReader(DATA_FILE));

                line = reader.readLine();
            }
            catch (Throwable ex)
            {
                ex.printStackTrace();
            }
            finally
            {
                try
                {
                    reader.close();
                }
                catch (Throwable ex)
                {
                }
            }

            Compute fft = new Compute(debug);
            int[] input = Util.convert(line);
            int[] data = fft.process(input, 100);

            System.out.print("First 8 digits: ");

            for (int i = 0; i < 8; i++)
            {
                System.out.print(data[i]);
            }

            System.out.println();
        }
    }
}
@@ -1629,21 +1629,22 @@
 t%5B%5D 
-input
+signal
  = Util.
 conv
@@ -1643,20 +1643,40 @@
 til.
-convert(line
+replicate(line, Util.REPEAT_SIZE
 );%0A 
@@ -1707,74 +1707,276 @@
 fft.
-p
+fastP
 rocess(
-input, 100);%0A%0A            System.out.print(%22First 8 digits
+signal, Util.PHASES);%0A            int offset = Util.offset(line);%0A%0A            if (debug)%0A                System.out.println(%22Offset for %22+line+%22 is %22+offset);%0A%0A            int%5B%5D message = Util.message(data, offset);%0A%0A%0A            System.out.print(%22Message
 : %22)
@@ -2014,9 +2014,25 @@
 i %3C 
-8
+Util.MESSAGE_SIZE
 ; i+
@@ -2081,20 +2081,23 @@
 t.print(
-data
+message
 %5Bi%5D);%0A  

Update FFT.java