alone-webman/compress

中间件-内容编码压缩

1.0.0 2025-05-29 07:39 UTC

This package is auto-updated.

Last update: 2025-06-02 08:46:33 UTC


README

  • 仅限在webman中使用

安装仓库

composer require alone-webman/compress

中间件方法

  • 可以任何config/middleware.php中使用
return [
    '@' => [alone_mid_compress(array $encoding = ['br', 'gzip', 'deflate'])]
];

内容编码压缩方法

  • 不使用中间件时可以使用此方法
alone_compress(string $encoding, string $body, array $method = []):array;