The Lempel-Ziv-Welch (LZW) algorithm provides loss-less data compression. You can read a complete description of it in the   [[wp:Lempel-Ziv-Welch|Wikipedia article]]   on the subject.   It was patented, but it entered the public domain in 2004.