Anyone know how programs like PKZip and WinZip create their compressed files?

I figure it is something about comparing like bytes and removing any bytes that are repeated....

If anyone knows of a good site or has an example or can just explain it, that would be great.