netlogix/compressingfilesystemstorage

提供具有 zlib 压缩功能的可写文件系统存储的流包

dev-main 2022-11-30 15:59 UTC

This package is not auto-updated.

Last update: 2024-09-18 22:36:08 UTC


README

Flow 包提供具有 zlib 压缩功能的可写文件系统存储。此存储会自动处理数据的压缩和解压缩,因此无需在应用程序端进行特殊处理。

内部,使用 PHP 流包装器来处理压缩。请参考 PHP 文档

安装

composer require netlogix/compressingfilesystemstorage

配置

必须使用 CompressingWritableFileSystemStorage 配置 Flow 存储

Neos:
  Flow:
    resource:
      storages:
        nlxCompressingFileSystemStorage_zlib:
          storage: Netlogix\CompressingFileSystemStorage\CompressingWritableFileSystemStorage
          storageOptions:
            path: '%FLOW_PATH_DATA%Persistent/CompressingWritableFileSystemStorage/'
            # Can be any PHP stream wrapper, see https://php.ac.cn/manual/en/wrappers.compression.php
            streamWrapper: 'compress.zlib'