0

What characteristics does a file have, that is highly compressable using Gzip with the deflate algorithm.

I have a TSV File and I try to generate some more TSV files with the same compression rate. My original TSV file is about 700mb uncompressed and 40mb compressed.

I have tried to use longer strings which increased the compression rate (but not enough)

To write my files i use:

fileOutputStream = new FileOutputStream(outputFilePath);
GZIPOutputStream gzipOut = new GZIPOutputStream(fileOutputStream, 512000, false);
this.writer = new OutputStreamWriter(gzipOut, "UTF-8");
writer.write(line);  

Do you have any hints on how to recreate such a file?

Joha
  • 935
  • 12
  • 32

1 Answers1

2

Make a file with all zero bytes. As many as you like. If it's long enough, deflate will compress it approximately 1000:1.

Mark Adler
  • 101,978
  • 13
  • 118
  • 158
  • I want to fill it with example data, that are later gonna be used. So I need strings to fill the file with. I want to know if many different stings are good, or repeating, or repeating... – Joha Aug 09 '17 at 14:23