This module allows you to perform zstd
web compression for compressible resources.
Add the middleware like this -
npm install @itznotabug/appexpress-zstd
// import
import zstd from '@itznotabug/appexpress-zstd';
import AppExpress from '@itznotabug/appexpress';
// setup
const express = new AppExpress();
// set an optional compression level.
express.compression(zstd({ level: 12 }));
Note: If there was an error while compressing the content, the uncompressed content is returned as is.