harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Shipilev" <aleksey.shipi...@gmail.com>
Subject Re: [classlib][pack200] Decoupling I/O and processing for unpacking scenario
Date Fri, 18 Jul 2008 13:24:55 GMT
Sian,

On Fri, Jul 18, 2008 at 5:16 PM, Sian January
<sianjanuary@googlemail.com> wrote:
> There is an optional field in the segment header - archive_size that can
> give the size in bytes or be 0 if the compressor chooses not to specify the
> size.  I've just checked and Sun's compressor does specify this, and we can
> do in ours when it's written, although we will also have to allow for the
> possibility that it will be 0.
Awesome! Am I understanding correctly: this value determines the size
of segment? If yes, can you point me how to access this value? Is
there API in current implementation?

I think we can just check this field in Archive and:
 a. if the field != 0, then synchronously copy out entire segment from
inputStream to Segment's internal and do the unsynchronized
Segment.read() against internal buffer.
 b. if the field == 0, then synchronously do the Segment.read() agains
the inputStream

Thanks,
Aleksey.

Mime
View raw message