I need to send a photo from one mobile phone to another. Currently, I'm splitting the image up into bytes before sending and then reassembling the image on the second mobile. This works fine, but if the photo is large (and they keep getting larger due to the better cameras on phones), then it takes some time for the photo to be received by the second mobile.

Would trying to stream the photo offer a better experience? It seems that streaming would be faster because, theoretically, multiple frames would be received per second. Would streaming be faster than sending the photo in chunks of bytes? If so, why?

2 Answers 2


Not necessarily. No matter what you do, you have to deliver the same amount of data. There's no way round this. So whether you split it yourself and send chunks, or let the network layer do it under the covers is irrelevant. Now the network layer might be better at it than you - you can screw the transfer by splitting into too small chunks, so you could first see if increasing the file size makes things faster (on a LAN recent testing with a legacy system that sent 4k chunks went significantly faster when we upper the chunk size to 1Mb).

Typically I'd stream and let the network do the work for you though. Error handling is slightly more complex than chunked transfer but hopefully someone else will have taken care of this for you in a library.

One thing you can do to increase the experience is to give the end-user a smaller file transfer first (a thumbnail) so they can see if they'd like to wait for the full file transfer. The best experience sending an image is not to send it at all sometimes.

  • So, streaming seems faster because the consecutive images that are being sent are smaller (lower quality and resolution) than my one photo (which can be as small as 50kb or as large as greater than 1mb)?
    – OneSource
    Feb 16, 2016 at 9:36
  • I don't understand. If you want to increase user experience then letting them pick whether to download a photo or not is the way to go - and the means for them to determine if they want it is to see a thumbnail first. Streaming is just another way of downloading the same file, not too dissimilar from chunking.
    – gbjbaanb
    Feb 16, 2016 at 10:46
  • gbjbaanb, I definitely want to make the user experience the best as possible. I was just trying to understand how, when streaming is used, it seems like the data is transferred faster. But as you and Xtreme Biker have pointed out, there are multiple factors involved that can create that impression (or reality).
    – OneSource
    Feb 17, 2016 at 0:02

Sending the photo in chunks of bytes could actually represent a kind of streaming, because the streaming concept just means being able to reproduce some file at client side without the need of it being fully downloaded.

Actually, the speed you're referring to is dependent on the protocol and technologies being used to transfer the file. As for this, you should better analyze the options you've got with that protocol and make a decision based on them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.