title: How to offer a file compressed as download via spring @RestController?
body: <p>I have a servlet that offers a <code>CSV</code> file for download:</p>
  
  <pre><code>@RestController 
  @RequestMapping("/")
  public class FileController {
  
      @RequestMapping(value = "/export", method = RequestMethod.GET)
      public FileSystemResource getFile() {
          return new FileSystemResource("c:\file.csv"); 
      }
  }
  </code></pre>
  
  <p>This works just fine.</p>
  
  <p>Question: how can I offer this file as compressed file? (zip, gzip, tar doesn't matter)?</p>