compressing bytes to send in objectoutputstream

i am currently compressing a byte[] to send over the internet. i have used the deflater.best compression, but haven't noticed any performance increases.

when no compression happens it takes a little longer over the internet to reach it's destination.

when doing compression it takes longer for the compression/decompression to happen that it adds to the overall time, making it equal in time to using no compression.

i am on the road and not able to change code on my server, but wanted to see if there was any other ideas on how to transmit the bytes quicker. i am currently sending video and images from a client to server, and then back to the client when requested. i didn't know if some of the other deflater compression types would work better, such as huffman or best_speed. i haven't come across any other ideas, but am looking to speed up the transmission as it take roughly 1:30-2:00 minutes to transmit the videos I am sending. and to view the video that is much longer than wanted.

i also read about the CompressedBlockOutputStream and CompressedBlockInputStream and wasn't sure if they would work well either.

thanks

[1172 byte] By [developprogramsa] at [2007-11-27 4:06:57]
# 1

There will be some lag due to the overhead of the compression/decompression algorithm, but as you suggest, different compression algorithms may result in smaller data size with a satisfactory speed-up in transmission time.

You should test different compressions algorithms and find what works best.

RichFearna at 2007-7-12 9:12:07 > top of Java-index,Java Essentials,New To Java...
# 2
Can you consider compressing the images and video that are being sent?
jsalonena at 2007-7-12 9:12:07 > top of Java-index,Java Essentials,New To Java...
# 3

i am currently compressing the image/video and sending them, then doing the decompression on the client or server side. but the decompression runs slow, so the time is fairly equal between using compression and no compression in the overall time it takes to get from one place to the other and be displayed or stored.

developprogramsa at 2007-7-12 9:12:07 > top of Java-index,Java Essentials,New To Java...
# 4
I meant compressing the actual data you are sending. Lossy compression of the original content in the application level will save a lot more bandwidth than lossless compression of the data when it's already encoded. For instance if you are sending JPEG images, make the quality setting
jsalonena at 2007-7-12 9:12:07 > top of Java-index,Java Essentials,New To Java...