The 1MB limit was for reading any compressed file.  There is really no
distinction between assets and resources in this regard.  That said, you
can pre-compress your data and store it with say a .zip extension (so there
is no attempt to try to compress it again), and then de-compress the data
yourself when reading it.

On Tue, Aug 21, 2012 at 3:56 PM, Tamás Kovács
<falcon.firebre...@gmail.com>wrote:

> Thanks, Dianne.
>
> Was the 1MB limitation removed in case of *assets* as well, or only
> for *resources*?
>
> On Aug 22, 12:28 am, Dianne Hackborn <hack...@android.com> wrote:
> > Prior to I think Gingerbread, it would entirely uncompress in memory
> with a
> > limit on the amount of memory it would use (I think 1MB) above which the
> > open would fail.  On current versions of the platform it uncompression is
> > streamed as you read it with no limit on size.
> >
> > On Tue, Aug 21, 2012 at 1:25 PM, Tamás Kovács
> > <falcon.firebre...@gmail.com>wrote:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > > Hello,
> >
> > > I have a custom file format in res/raw, which means it will get
> > > compressed in APK.
> >
> > > Question:
> >
> > > Assume my application is installed on the device. When I open a file
> > > via openRawResource(), does it completely uncompress the file in the
> > > memory?
> >
> > > E.g. if it's a 3MB file, will it uncompress it in memory? If I only
> > > need 10KB data from a certain offset (and I reach it via
> > > BufferedInputStream.skip), will it still consume 3MB when
> > > openRawResource() is called?
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to