Texturing - JPG Compression in Memory

Hello i have to use a DIB image as texture.
but it is in another PC!
so for transfer the image i think i have to compress it in JPeg without write it in the HD
as here:

Cimage *image;
image->save(“new.jpg”);

because it will be more quickly and i can break my HD using the HD many times.
So, How can i write a Jpeg in memory and transfer it to another pc where i can reconvert it in a DIB image?
do you prompt me alternative metods?

thanks a lot

You use a networking protocol, to transfer the image. Something like UDP or TCP for example, you’ll need to learn the appropriate system API for this.

This is not an OpenGL question.

P.S. you will NOT break your hard drive using it many times.