LZW (Lempel–Ziv–Welch) is a universal data compression algorithm that finds repetitive patterns within data. It builds a dictionary of frequently occurring sequences, replacing them with shorter codes to reduce file size. This method is notably employed in the GIF image format.