[youtubei.js](../../../README.md) / [LZW](../README.md) / compress # Function: compress() > **compress**(`input`): `string` Compresses a string using the LZW compression algorithm. ## Parameters • **input**: `string` The data to compress. ## Returns `string` ## Defined in [src/utils/LZW.ts:5](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/utils/LZW.ts#L5)