How can I store JPEGs as Byte[] for faster loading?
<p>I need to load ~150 JPEG images into ArrayList for playing an animation.</p>

<p>If I load them like that </p>

<pre><code>ByteArrayOutputStream stream = new ByteArrayOutputStream();
BitmapFactory.decodeResource(getResources(), R.drawable.y1).compress(Bitmap.CompressFormat.JPEG, 80, stream);
byeArr.add( stream.toByteArray() );
</code></pre>

<p>it can take up to ~10 seconds for 150 images, so maybe there is a way to speed it up? Can I somehow store this images in resources or in assets already as byte[] or something?</p>

<p>Thanks</p>
