Commit 9362d6bb authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

Corrected space savings calculation

parent 966522f4
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -47,10 +47,12 @@ class TestResult {
    result.append("   Compressed size: " + compressedSize + "\n");
    result.append("   Encoding time:   " + (runTime / 1000.0) + " seconds" + "\n");
    result.append("\n");
    result.append("   Compression ratio:  " + String.format("%.2f",
        ((double) originalSize / compressedSize * 100.0)) + "\n");
    result.append("   Space savings:      " + String.format("%.2f%%",
        (1.0 - (double) compressedSize / originalSize)) + "\n");
    result.append("   Compression ratio:  " +
            String.format("%.2f", ((double) originalSize / compressedSize * 100.0)) +
            "% \n");
    result.append("   Space savings:      " +
            String.format("%.2f%%", (1.0 - (double) compressedSize / originalSize)*100.0) +
            "%\n");
    result.append("Decoding test: " + (testPass ? "passed" : "FAILED!!!"));
    return result.toString();
  }