In this paper, we propose two lossless compression techniques that represent a two dimensional Run-length Coding which can achieve high compression ratio. This method works by partitioning the block regions of the input image into rectangles instead of working by runs of adjacent pixels, so it is found to be more efficient than 1D RLE Run-length Coding for transmitting texts and image. In the first method, length and width of consecutive black and white rectangles are transmitted. The idea of this method is new and it can be very effective for some images which have large blocks of black or white pixels. But in the second method only black rectangles are considered in order to transmit and an intelligent procedure is exploited to encoding the image. The first method is faster and simpler to implement than the second one but its compression ratio is lesser. Our proposed second scheme is more suitable for text compression and has outperformed the existence partitioning methods. Therefore, if we used these partitioning methods instead of previous partitioning methods in well-known lossless compression techniques, we would have a better compression ratio.