Compressed Pattern Matching For Text And Images