Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Sending compressed data to a blob
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
![]() |
![]() |