title: Write "compressed" Array to increase IO performance?
body: <p>I have an int and float array each of length 220 million (fixed). Now, I want to store/upload those arrays to/from memory and disk. Currently, I am using Java NIO's FileChannel and MappedByteBuffer to solve this. It works fine, but it takes near about 5 seconds (Wall Clock Time) for storing/uploading array to/from memory to disk. Now, I want to make it faster. </p>
  
  <p>Here, I should mention most of those array elements are 0 ( nearly 52 %).</p>
  
  <p>like:</p>
  
  <pre><code>int arr1 [] = { 0 , 0 , 6 , 7 , 1, 0 , 0 ...}
  </code></pre>
  
  <p>Can anybody help me, is there any nice way to improve speed by not storing or loading those 0's. This can compensated by using Arrays.fill (array , 0).</p>