Function compress

  • Compress data with Zstandard.

    Under the hood, this uses a shared, lazily-initialized Compressor, which minimizes overhead. If you need dictionary support, create your own instance of that class.

    Parameters

    • data: Uint8Array

      Buffer containing data to compress

    • parameters: CompressParameters = {}

      Optional compression parameters

    Returns Buffer

    Compressed data