What do you mean? You absolutely can run compression in WASM.
For example here is Gzip in WASM: https://github.com/ColinTimBarndt/wasm-gzip