Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 51470 invoked from network); 18 Jul 2008 13:29:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jul 2008 13:29:45 -0000 Received: (qmail 5339 invoked by uid 500); 18 Jul 2008 13:29:39 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 5316 invoked by uid 500); 18 Jul 2008 13:29:38 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 5302 invoked by uid 99); 18 Jul 2008 13:29:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 06:29:38 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sianjanuary@googlemail.com designates 209.85.146.178 as permitted sender) Received: from [209.85.146.178] (HELO wa-out-1112.google.com) (209.85.146.178) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 13:28:43 +0000 Received: by wa-out-1112.google.com with SMTP id j5so181301wah.18 for ; Fri, 18 Jul 2008 06:29:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=IzKGTI5XlhctwVfCQnNAbPItkzoisoFSrNlCtbsU2t0=; b=rlU+iW5YRr+PyBwVZNsQySbTSk4623AsbOB6/YiSl774R66QZ/iqN3wF+i2XdrLE1A UOKj/OnQ2XaIuQybFRpQCVSgdrnhqFjC0KZaQ926Ym6iv9lhnV/3U5uPkxLnzjYbX0AT 56T7kWUHI/yHcjF3eUv/DJ298KsEyzTRTVctw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=mx3nkP10mSmKGwYC9n4st33+lrApzq9eAvveA5ErukayHM72cnP2Rj97CkI6ZAPhBn J+EjnlCI0wzCALY9QDZy7vORO16/CCuZ/WL9e+RXg/VWsSZh5UyOsah/WuLMSVhHJnB7 dm1sshsHe3KDOdjcx2LGq5pbfPy8ZWjfP6reI= Received: by 10.115.73.20 with SMTP id a20mr115721wal.32.1216387748089; Fri, 18 Jul 2008 06:29:08 -0700 (PDT) Received: by 10.114.148.6 with HTTP; Fri, 18 Jul 2008 06:29:07 -0700 (PDT) Message-ID: Date: Fri, 18 Jul 2008 14:29:07 +0100 From: "Sian January" To: dev@harmony.apache.org Subject: Re: [classlib][pack200] Decoupling I/O and processing for unpacking scenario In-Reply-To: <4bebff790807180624i2f95a703t5503f38e623e6b95@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_49665_11663180.1216387748069" References: <4bebff790807170935y1640f01am9eeb5decdec1c36@mail.gmail.com> <4bebff790807180233o6b487449l91264f162bd43cf7@mail.gmail.com> <4bebff790807180624i2f95a703t5503f38e623e6b95@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_49665_11663180.1216387748069 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 18/07/2008, Aleksey Shipilev wrote: > > Sian, > > On Fri, Jul 18, 2008 at 5:16 PM, Sian January > 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? Yes - use SegmentHeader.getArchiveSize() 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 Sounds like a good plan. Thanks, > Aleksey. > -- Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU ------=_Part_49665_11663180.1216387748069--