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 -> Sending compressed data to a blob

Sending compressed data to a blob

From: Gary Devouges <gary.devouges_at_sympatico.ca>
Date: Fri, 31 Dec 1999 13:41:08 GMT
Message-ID: <Un2b4.26240$Ke.12778@news21.bellglobal.com>


Hi,
  I have been trying to send compressed data to a blob then trying to read it back. Here is how I do it:

DeflaterOutputStream os = new
DeflaterOutputStream(someBlob.getBinaryOutputStream());

....

DeflaterOutputStream.write(a bunch of stuff);

close all......

No execution errors and there are 'X' bytes written to the stream.

Then to read,

InflaterInputStream is = new
InflaterInputStream(someBlob.getBinaryStream())

then anyting O do with is such as length, read... etc... just says "unknown compression type"


Now if I send everything to ByteArrayStream iinstead, the retrievbe the byte array and write the byte array to the Deflater stream, I get the same 'X' amount of bytes and I can read them back.

However, if my file is more than a few hundred kilobytes, I strart getting decompression errors.

Strange.

Anyone have any experiences with this ?

Thanks
Gary Received on Fri Dec 31 1999 - 07:41:08 CST

Original text of this message

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