> Isn't the whole point of compression algorithms to find string of bytes that are the same?
No. The goal of compression algorithms is to describe an object approximately (lossy) or accurately (lossless) using the smallest number of [insert unit] possible. In some cases looking for strings of bytes that are the same serves well enough.
Examples of lossy algorithms that don't just look for same strings of bytes are audio and video codecs.
An example of lossless compression that works differently would be compressing "123456789" as "1 to 9".
> Seems simple to detect and handle?
Sure. If you've got infinite memory and time. Depending on your format you may also need to read the whole input before you can start writing the first byte.
No. The goal of compression algorithms is to describe an object approximately (lossy) or accurately (lossless) using the smallest number of [insert unit] possible. In some cases looking for strings of bytes that are the same serves well enough.
Examples of lossy algorithms that don't just look for same strings of bytes are audio and video codecs.
An example of lossless compression that works differently would be compressing "123456789" as "1 to 9".
> Seems simple to detect and handle?
Sure. If you've got infinite memory and time. Depending on your format you may also need to read the whole input before you can start writing the first byte.