commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Lundberg (JIRA)" <j...@apache.org>
Subject [jira] Moved: (COMPRESS-48) [compress] add a memory efficient stream compress InputStream - e.g. a "DeflaterInputStream"
Date Mon, 23 Mar 2009 22:19:56 GMT

     [ https://issues.apache.org/jira/browse/COMPRESS-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dennis Lundberg moved SANDBOX-129 to COMPRESS-48:
-------------------------------------------------

    Component/s:     (was: Compress)
            Key: COMPRESS-48  (was: SANDBOX-129)
        Project: Commons Compress  (was: Commons Sandbox)

> [compress] add a memory efficient stream compress InputStream - e.g. a "DeflaterInputStream"
> --------------------------------------------------------------------------------------------
>
>                 Key: COMPRESS-48
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-48
>             Project: Commons Compress
>          Issue Type: Improvement
>         Environment: Operating System: All
> Platform: Other
>            Reporter: Ralf Hauser
>            Assignee: Torsten Curdt
>            Priority: Minor
>
> Assume from a struts-tomcate web-app I get a large file that I want to store in
> a DB. To save DB permanent storage, I want to compress this. To be portable, I
> rather want to do that in java than on the DB-side with some proprietary commands.
> In order not to have to load into the RAM at least the entire compressed output
> by e.g. creating a ByteArrayOutputStream with for example
> java.util.zip.GZIPOutputStream or java.util.zip.DeflaterOutputStream and then
> converting it back to an InputStream for the PreparedStatement
> stmt.setBinaryStream(int pos,
> InputStream stream, int length), I envision an InputStream converter that is
> memory efficient.
> I started implementing it myself and got it working at least for
> single-byte reads. But it is far from production-readiness - perhaps I should
> rather extend java.io.PipedInputStream than trying to do my own efficient
> buffer management and do all the synchronize() blocking etc. 
> ==> shouldn't something go into org.apache.commons.compress.zip?
> There are certainly other applications for such a class.
> P.S.: Alternatively, there is a "OutputStream java.sql.Blob.setBinaryStream(long
> pos)" but for example in MySQL that "updatable BLOB that can update in-place" is
> not yet implemented. Doing proprietary SQL-"COMPRESS" as per
> http://dev.mysql.com/doc/mysql/en/string-functions.html is probably an even less
> preferrable option.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message