RLE = run length encoding is a technology for lossless (image) compression. So you should decompress an JPEG image first. You find the Microsoft variant of RLE described here: https://docs.microsoft.com/en-us/windows/win32/gdi/bitmap-compression. Its quite old and the internet is full of implementations.
Because JPEG is a lossy compression, a decompressed JPEG will show slight variations of color values and is therefore not a good input to RLE which needs runs of identical color values for efficient compression.
RLE is a general principle, there is also a kind of RLE used wihtin JPEG. The classic introduction to JPEG technology is http://ijg.org/files/Wallace.JPEG.pdf