title: How to use TrueZip to compress files?
body: <p>I have a file, let's say <code>C:\source.dat</code>. I want to compress it into a zip file <code>C:\folder\destination.zip</code>.</p>
  
  <p>I can't find a straightforward example, and the HelloWorld provided with the Maven project doesn't really apply in my case because I'm not writing a plaintext file, so hopefully someone can enlighten me on this.</p>
  
  <p>For reference, the code provided in the example:</p>
  
  <pre><code>@Override
  protected int work(String[] args) throws IOException {
      // By default, ZIP files use character set IBM437 to encode entry names
      // whereas JAR files use UTF-8.
      // This can be changed by configuring the respective archive driver,
      // see Javadoc for TApplication.setup().
      final Writer writer = new TFileWriter(
              new TFile("archive.zip/dir/HälloWörld.txt"));
      try {
          writer.write("Hello world!\n");
      } finally {
          writer.close();
      }
      return 0;
  }
  </code></pre>