Help Center> Object Storage Service> Console Operation Guide> Configuring an Online Decompression Policy (Beta Testing)
Updated on 2023-05-30 GMT+08:00

Configuring an Online Decompression Policy (Beta Testing)

You can compress multiple files into a ZIP package and then upload it to OBS for auto decompression online.

To achieve online decompression, configure a decompression policy before a package upload. If an uploaded package matches the configured policy, OBS automatically decompresses the package. Decompression policies do not apply to the ZIP packages that already exist in OBS before the policies are created.

Online decompression is currently available only in the CN North-Beijing4, CN South-Guangzhou, and CN East-Shanghai1 regions.


  1. In the navigation pane of OBS Console, choose Object Storage.
  2. In the bucket list, click the bucket name you want. The Objects page is displayed.
  3. In the navigation pane, choose Data Processing > Online Decompression. The Online Decompression page is displayed.
  4. Click Create Online Decompression Policy.
  5. Configure the online decompression policy. Table 1 describes the related parameters.

    Table 1 Parameter description



    Policy Name

    Enter a policy name that is easy to remember. The value can contain 1 to 256 characters, and only uppercase letters, lowercase letters, digits, underscores (_), and hyphens (-) are allowed, for example, event_0001.


    Events that you want to trigger the online decompression policy for. Currently, the following event types are supported:

    • ObjectCreated: all kinds of object creation operations, including PUT, POST, and COPY of objects, as well as the merging parts of multipart tasks
    • Put: object upload using PUT
    • Post: object upload using POST
    • Copy: object copying using COPY
    • CompleteMultipartUpload: merging parts of multipart tasks

      To decompress the ZIP package that contains other ZIP packages, set the event type to ObjectCreated or CompleteMultipartUpload.


    Optional. If this parameter is configured, the decompression policy applies to the packages whose name contains this prefix. The prefix cannot start with a slash (/) or contain double slashes (//), or contain special characters (\ : * ? " < > |). The total length of the prefix and suffix cannot exceed 1024 characters.

    • With this parameter configured, ZIP packages whose name contains the specified prefix will trigger online decompression.
    • With this parameter left blank, the decompression policy applies to all the uploaded ZIP packages.
      • You are advised to configure a prefix. Otherwise, cyclic decompression may occur if a package contains other packages.
      • The configured prefix must contain all levels of the directory for storing the object.

        For example, there is an object example123 that is stored under bucket/file/example123. If you want example to be the prefix, set the prefix to file/example.


    If this parameter is specified, the decompression policy applies to the packages whose name contains this suffix. Currently, only ZIP packages are supported.

    Duplicate Name Processing

    This parameter specifies how the decompressed objects are processed if they have the same names as the existing objects in the bucket.
    • Do not decompress: Retains the existing objects in the bucket, and does not decompress the objects with the same name.
    • Rename the file: Renames the decompressed objects with the CRC32 value.
    • Overwrite: Overwrites the existing objects with the same name in the bucket.

    Decompress To

    Optional, this parameter specifies the path for storing decompressed files. It cannot contain special characters (\:*?\"<>|), start or end with a period (.), or contain two or more consecutive slashes (/). The value can contain 0 to 1023 characters.
    • With this parameter configured, the path must end with a slash (/). After a ZIP package is decompressed, the decompressed files are stored in the folder with the same name as the path.

      If there is no such folder in the bucket, the system automatically creates one for storing the decompressed files.

    • With this parameter left blank, decompressed objects are stored in the home directory of the bucket.

    IAM Agency

    Select an IAM agency of OBS, with permission OBS OperateAccess assigned to this agency.

    If no such agency is available, create one.

  6. Click OK. The online decompression policy is created.