Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Text Compression

Text Compression

From: Kevin Crosbie <caoimhinocrosbai_at_at_yahoo.com>
Date: Tue, 27 Jun 2006 19:06:31 +0200
Message-ID: <44a16534$0$20076$88260bb3@news-taz.teranews.com>


Hi,

I'm trying to implement a program in PL/SQL on Oracle 9iR2, OS is Tru64, that tells me the size in bytes before and after I compress some text.  It's a test to see how compressible data is over a moving window.

So, I want something like:
before := length(text_value);
after := length(compress(text_value));

This is fine on 10g, as I can use the UTL_COMPRESS package, but there doesn't appear to be any built-in support in 9iR2 for text compression.

I have tried a few solutions, calling Java procedures that use a DeflaterOutputStream, but I find this quite slow for large pieces of text.

I had thought about trying something like calling zcat as an external procedure or directly to the zlib shared library from www.zlib.net, but before I embark, I wanted run this by the group as I'm sure someone has had to tackle this before.

Another thought I had was to use an uncompressed table and a compressed table to see what the size was before and after, but that seems a little brutish.

Regards,

Kevin Received on Tue Jun 27 2006 - 12:06:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US