Fastest way to read file as a byte array
<p>What is the fastest way to read a file as a byte array (on Android)? The file is about 4 MB. It's inside the assets directory, which means that it's probably compressed.</p>

<p>Currently, I'm doing something like this:</p>

<pre><code>byte[] buffer = new byte[4 * 1024 * 1024];
context.getAssets().open(FILE_NAME).read(buffer);
</code></pre>

<p>On Android, creating the array takes about 40 ms, reading the file about 120 ms. I suspect that the 40 ms consist mostly of filling the array with zeroes. Can I avoid this?</p>

<p>The file is basically a list of about 100,000 items which need to be searched through quickly.</p>
