Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 49010 invoked from network); 1 Sep 2009 12:13:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Sep 2009 12:13:10 -0000 Received: (qmail 19127 invoked by uid 500); 1 Sep 2009 12:13:09 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 19025 invoked by uid 500); 1 Sep 2009 12:13:09 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 19015 invoked by uid 99); 1 Sep 2009 12:13:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2009 12:13:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of grobmeier@gmail.com designates 209.85.218.222 as permitted sender) Received: from [209.85.218.222] (HELO mail-bw0-f222.google.com) (209.85.218.222) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2009 12:12:59 +0000 Received: by bwz22 with SMTP id 22so4291600bwz.42 for ; Tue, 01 Sep 2009 05:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=AViM2ja093+k9ZjT7c23qzDqHe8gPcIsqgv0zl/nW0Y=; b=vpqiJpFMR5QqikAJGdZAnioEweRXc3/rKbp47gWMVhYc5Rz4gEvf7r7lhAIC1CNR8a YwqmLRPpw+p5ejOz97yTEkTe8V3tEB75rPsh2o5TlC2ZqM4Cmk1LwDzI7DufkmbHTmFK P70diwnJ1gNWu58DN+IxSXQd3tRlo6wJIKJBQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=p+YON3B6ykBUMt5oDm5N30wNKrIBxNbsn6BBw1qYvLEcDdnDpxLAJHv8mIYr2dSMEl A/vPDiQfmn918erCYdlD5GwnTUb8H7E+NCn/Gkfp4uvseuc1luokQgaUsykqEbZhVWcB 8qHZCd0p/FwISpLRKwXoI4y5IN2ktrt66x0wA= MIME-Version: 1.0 Received: by 10.102.197.11 with SMTP id u11mr2894240muf.97.1251807159090; Tue, 01 Sep 2009 05:12:39 -0700 (PDT) In-Reply-To: <4A9CF873.7010504@gmail.com> References: <4A9CF873.7010504@gmail.com> From: Christian Grobmeier Date: Tue, 1 Sep 2009 14:12:19 +0200 Message-ID: Subject: Re: [compress] add a memory efficient stream compress InputStream - e.g. a "DeflaterInputStream" To: Commons Users List Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Hi there, I think this one has been addressed in https://issues.apache.org/jira/browse/COMPRESS-83 This change is not released yet. You might want to check the code out from SVN and build it yourself. I have some time left later this year and hopefully this change will come with an 1.1 version soon. But this needs to be discussed on the dev list. Let me know if you need help or if this works out for you Best regards, Christian On Tue, Sep 1, 2009 at 12:33 PM, Patrick Herber wrote: > Hello! > > I've the same issue as described in > > https://issues.apache.org/jira/browse/COMPRESS-48 > > My web application recieves an InputStream (an uploaded large file) which I > need to save compressed in the DB. > Currently (since the file could be really big) I save it GZIP-ed into a Temp > File and then I open a new InputStream to that file. However this process > take up more than 60% of the overall method execution: > > tempFile = File.createTempFile(Long.toString(getId()), null); > tempFile.deleteOnExit(); > GZIPOutputStream gos = new GZIPOutputStream(new FileOutputStream(tempFile)); > IOUtils.copy(is, gos); > is = new FileInputStream(tempFile); > stmt.setBinaryStream(3, is, -1); > stmt.executeUpdate(); > > The issue is marked as fixed but I didn't find how/where. > Could you kindly give me a sample how to do it? > > Thanks a lot for your help > > Best regards > > Patrick > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org