What is the simplest algorithm to compress a string?
If you need something reasonably effective but not very taxing to implement, I would recommend LZW.
LZW has several advantages, not the least of which is that it uses fixed-width codes (the width strictly increases as compression proceeds), rather than Huffman or arithmetic coding. It also does not require string searching through a sliding window, instead performing hash table or tree lookup per input character. This means that it requires significantly less code to implement than methods based on LZ77.