# Zip / Unzip - File Compression < 10MB

## Links

- Product page URL: https://www.agentpmt.com/marketplace/zip-unzip-file-compression-10mb
- Product markdown URL: https://www.agentpmt.com/marketplace/zip-unzip-file-compression-10mb?format=agent-md
- Product JSON URL: https://www.agentpmt.com/marketplace/zip-unzip-file-compression-10mb?format=agent-json

## Overview

- Product ID: 695c36ca767df5adfd9bc86f
- Vendor: Apoth3osis
- Type: core utility
- Unit type: request
- Price: 1000 credits
- Categories: Data Storage & Persistence, File Transfer & Remote Access, File & Binary Operations
- Generated at: 2026-05-30T20:24:16.510Z

### Page Description

File compression and decompression utility that handles zip and gzip formats for archives up to 10MB in size. This function supports two primary actions: compress and decompress, allowing users to bundle multiple files into a single zip archive or compress individual files using gzip, as well as extract contents from existing archives. For zip compression, users provide an array of files with filenames and base64-encoded content, supporting up to 200 files per archive with built-in path traversal protection for security. For gzip operations, users supply a single base64-encoded input along with an optional filename. Decompression accepts archives via base64 encoding or cloud storage file ID, automatically extracting all contents and optionally returning each file's base64 data inline for immediate processing. Extracted files and generated archives are stored in cloud storage with secure signed URLs for convenient access, and users can toggle the include_contents option to receive base64 output directly in the response. With automatic size validation and budget-based access controls, the Archive Compressor provides a reliable solution for standard file bundling and extraction workflows within agent pipelines.

### Agent Description

Compress/decompress zip and gzip archives up to 10MB. Up to 200 files per archive with path traversal protection.

## Details

### Details

File compression and decompression utility that handles zip and gzip formats for archives up to 10MB in size. This function supports two primary actions: compress and decompress, allowing users to bundle multiple files into a single zip archive or compress individual files using gzip, as well as extract contents from existing archives. For zip compression, users provide an array of files with filenames and base64-encoded content, supporting up to 200 files per archive with built-in path traversal protection for security. For gzip operations, users supply a single base64-encoded input along with an optional filename. Decompression accepts archives via base64 encoding or cloud storage file ID, automatically extracting all contents and optionally returning each file's base64 data inline for immediate processing. Extracted files and generated archives are stored in cloud storage with secure signed URLs for convenient access, and users can toggle the include_contents option to receive base64 output directly in the response. With automatic size validation and budget-based access controls, the Archive Compressor provides a reliable solution for standard file bundling and extraction workflows within agent pipelines.

### Actions

- `compress` (10 credits): Create a ZIP or GZIP archive from input files. ZIP supports up to 200 files; GZIP compresses a single file. Maximum total size is 10MB.
- `decompress` (10 credits): Extract files from a ZIP or GZIP archive provided via base64 or file ID. Extracted files are stored in cloud storage.

### Use Cases

Bundling multiple generated reports or documents into a single downloadable zip file, extracting uploaded zip archives to process individual files in automated workflows, compressing JSON or CSV data exports for efficient storage and transfer, unpacking user-submitted archives to validate and scan contained files, creating backup bundles of configuration files or logs for archival, decompressing gzipped API responses or data feeds for parsing, packaging multi-file code outputs or assets for delivery to end users, reducing payload sizes for base64 data transfers between pipeline stages, extracting email attachments from compressed formats for content analysis, preparing batched file uploads by compressing multiple assets into a single archive for downstream systems

### Workflows Using This Tool

No public workflows currently reference this product.

### Related Content

No related content is currently linked to this product.

## Integration Details

### DynamicMCP

- Setup page URL: https://www.agentpmt.com/dynamic-mcp
- Claude setup guide: https://www.agentpmt.com/dynamic-mcp?platform=claude#videos
- ChatGPT setup guide: https://www.agentpmt.com/dynamic-mcp?platform=chatgpt#videos
- Cursor setup guide: https://www.agentpmt.com/dynamic-mcp?platform=cursor#videos
- Windsurf setup guide: https://www.agentpmt.com/dynamic-mcp?platform=windsurf#videos

Use the local router for command-based MCP clients. It forwards requests to `https://api.agentpmt.com/mcp` and does not execute tools locally.

```bash
npm install -g @agentpmt/mcp-router
agentpmt-setup
```

### REST API

The live page renders cURL, Python, JavaScript, and Node.js examples. Logged-in users see those examples prefilled with their own API and budget credentials.

- Purchase endpoint: https://api.agentpmt.com/products/purchase
- Authorization format: `Bearer <base64(apiKey:budgetKey)>`

```bash
curl -X POST "https://api.agentpmt.com/products/purchase" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eW91ci1hcGkta2V5LWhlcmU6eW91ci1idWRnZXQta2V5LWhlcmU=" \
  -d '{
    "product_id": "695c36ca767df5adfd9bc86f",
    "parameters": {
      "action": "compress",
      "archive_format": "zip",
      "include_contents": false,
      "store_file": true
    }
  }'
```

### Autonomous Agents

Autonomous agents can access this tool through AgentAddress credit balances or direct x402 payments. Use the Autonomous Agent API reference for endpoint shapes after choosing the access pattern below.

- Autonomous Agent API reference URL: https://www.agentpmt.com/docs/api-reference/autonomous-agents
- Autonomous Agent API reference markdown URL: https://www.agentpmt.com/docs/api-reference/autonomous-agents?format=agent-md
- Credit-Based Access Using AgentAddress: https://www.agentpmt.com/docs/autonomous-agents/credit-based-tool-usage-with-agentaddress
- AgentAddress is preferred for persistent file access, stored platform state, and maximum tool use ability across repeated calls.
- Direct x402 is for independent one-off tool calls that do not require shared files or stored platform state.
- Direct x402 public payments: USDC on Base, Arbitrum, Optimism, Polygon, and Avalanche.

### Schema

#### Parameters

- Schema type: actions

```json
{
  "actions": {
    "compress": {
      "description": "Create a ZIP or GZIP archive from input files. ZIP supports up to 200 files; GZIP compresses a single file. Maximum total size is 10MB.",
      "properties": {
        "archive_format": {
          "type": "string",
          "description": "Archive format to use.",
          "required": true,
          "enum": [
            "zip",
            "gzip"
          ]
        },
        "files": {
          "type": "array",
          "description": "Files to include in a zip archive. Each object must have 'filename' (string) and 'content_base64' (string). Required for ZIP compression.",
          "required": false,
          "items": {
            "type": "object",
            "properties": {
              "filename": {
                "type": "string",
                "description": "Filename/path inside the archive.",
                "required": true
              },
              "content_base64": {
                "type": "string",
                "description": "Base64-encoded file content.",
                "required": true
              }
            }
          }
        },
        "input_base64": {
          "type": "string",
          "description": "Base64-encoded file content for GZIP compression.",
          "required": false
        },
        "filename": {
          "type": "string",
          "description": "Output archive filename (default: 'archive.zip' or 'archive.gz').",
          "required": false
        },
        "include_contents": {
          "type": "boolean",
          "description": "Include base64 of the archive in the response.",
          "required": false,
          "default": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store output in cloud storage for file management access.",
          "required": false,
          "default": true
        }
      }
    },
    "decompress": {
      "description": "Extract files from a ZIP or GZIP archive provided via base64 or file ID. Extracted files are stored in cloud storage.",
      "properties": {
        "archive_format": {
          "type": "string",
          "description": "Archive format of the input.",
          "required": true,
          "enum": [
            "zip",
            "gzip"
          ]
        },
        "input_base64": {
          "type": "string",
          "description": "Base64-encoded archive to decompress.",
          "required": false
        },
        "file_id": {
          "type": "string",
          "description": "File ID of a previously stored archive to decompress.",
          "required": false
        },
        "filename": {
          "type": "string",
          "description": "Output filename for GZIP decompressed file (default: 'decompressed').",
          "required": false
        },
        "include_contents": {
          "type": "boolean",
          "description": "Include base64 content of each extracted file in the response.",
          "required": false,
          "default": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store each extracted file in cloud storage.",
          "required": false,
          "default": true
        }
      }
    }
  },
  "properties": {}
}
```

### Usage Instructions

# Zip / Unzip - File Compression < 10MB

Compress and decompress files using ZIP or GZIP formats. Handles archives up to 10MB with up to 200 files. Output files are stored in cloud storage for 7 days by default.

## Actions

### compress

Create a ZIP or GZIP archive from input files.

#### ZIP Compression

**Required fields:**
- `action`: `"compress"`
- `format`: `"zip"`
- `files`: Array of file objects, each with:
  - `filename` (string) - Name/path for the file inside the archive
  - `content_base64` (string) - Base64-encoded file content

**Optional fields:**
- `filename` (string) - Name for the output ZIP file (default: `"archive.zip"`)
- `store_file` (boolean) - Store output in cloud storage (default: `true`)
- `include_contents` (boolean) - Include base64 of the archive in the response (default: `false`)

**Example:**
```json
{
  "action": "compress",
  "format": "zip",
  "files": [
    {"filename": "report.txt", "content_base64": "SGVsbG8gV29ybGQ="},
    {"filename": "data/notes.csv", "content_base64": "bmFtZSxhZ2UKQWxpY2UsMzA="}
  ],
  "filename": "my_reports.zip"
}
```

#### GZIP Compression

Compresses a single file using GZIP.

**Required fields:**
- `action`: `"compress"`
- `format`: `"gzip"`
- `input_base64` (string) - Base64-encoded content of the file to compress

**Optional fields:**
- `filename` (string) - Name for the output file (default: `"archive.gz"`)
- `store_file` (boolean) - Store output in cloud storage (default: `true`)
- `include_contents` (boolean) - Include base64 of the compressed output in the response (default: `false`)

**Example:**
```json
{
  "action": "compress",
  "format": "gzip",
  "input_base64": "TGFyZ2UgdGV4dCBmaWxlIGNvbnRlbnQgaGVyZS4u",
  "filename": "logfile.txt.gz"
}
```

---

### decompress

Extract files from a ZIP or GZIP archive.

#### ZIP Decompression

**Required fields:**
- `action`: `"decompress"`
- `format`: `"zip"`
- One of:
  - `input_base64` (string) - Base64-encoded ZIP archive
  - `file_id` (string) - File ID of a previously stored ZIP archive

**Optional fields:**
- `store_file` (boolean) - Store each extracted file in cloud storage (default: `true`)
- `include_contents` (boolean) - Include base64 content of each extracted file in the response (default: `false`)

**Example using base64 input:**
```json
{
  "action": "decompress",
  "format": "zip",
  "input_base64": "UEsDBBQAAAAI...",
  "include_contents": true
}
```

**Example using file_id:**
```json
{
  "action": "decompress",
  "format": "zip",
  "file_id": "abc123def456"
}
```

#### GZIP Decompression

**Required fields:**
- `action`: `"decompress"`
- `format`: `"gzip"`
- One of:
  - `input_base64` (string) - Base64-encoded GZIP file
  - `file_id` (string) - File ID of a previously stored GZIP file

**Optional fields:**
- `filename` (string) - Name for the decompressed output file (default: `"decompressed"`)
- `store_file` (boolean) - Store the decompressed file in cloud storage (default: `true`)
- `include_contents` (boolean) - Include base64 of the decompressed content in the response (default: `false`)

**Example:**
```json
{
  "action": "decompress",
  "format": "gzip",
  "file_id": "abc123def456",
  "filename": "restored_log.txt"
}
```

---

## Common Workflows

### Bundle multiple files for download
1. Call `compress` with `format: "zip"` and an array of files.
2. Use the returned `signed_url` to share or download the archive.

### Extract and inspect an uploaded archive
1. Call `decompress` with the `file_id` of the uploaded archive.
2. Each extracted file gets its own `file_id` and `signed_url` for individual access.

### Compress and retrieve inline
1. Call `compress` with `include_contents: true` and `store_file: false` to get the archive as base64 in the response without storing it.

---

## Important Notes

- **Size limit:** Total input and output must each be under 10MB. For larger files, use the large archive tool.
- **File count limit:** ZIP archives support up to 200 files.
- **Storage:** Output files are stored in cloud storage for 7 days by default when `store_file` is `true`.
- **ZIP format** supports multiple files; **GZIP format** compresses a single file.
- The response includes `file_id` and `signed_url` for each stored file.
- When decompressing a ZIP, the response includes a `files` array with details for each extracted file.

### Frequently Asked Questions

#### How do I connect this tool to an external agent?

- Page URL: https://www.agentpmt.com/faq
- Markdown URL: https://www.agentpmt.com/faq?format=agent-md

You can install the local MCP server by opening a terminal and running:

```
npm install -g @agentpmt/mcp-router
agentpmt-setup
```

This will connect you to local agents like Claude Code, Windsurf, Grok Build, Cursor, etc.

Alternatively you can connect to the hosted version with this config block, no installation required:

```
{
  "mcpServers": {
    "agentpmt": {
      "type": "streamable-http",
      "url": "https://api.agentpmt.com/mcp",
      "headers": {
        "Authorization": "Bearer <AGENTPMT_BEARER_TOKEN>",
        "x-instance-metadata": "{\"client\":\"generic-mcp\",\"platform\":\"remote\"}"
      }
    }
  }
}
```

[View MCP Connection Instructions](/docs/mcp-reference/connection) for more details.

#### How does an external agent use this tool?

- Page URL: https://www.agentpmt.com/faq
- Markdown URL: https://www.agentpmt.com/faq?format=agent-md

After the external agent is connected to an Agent Group that can use this tool, paste this prompt into the agent:

> Call the AgentPMT-Tool-Search-and-Execution tool with action 'get\_schema' and tool\_id 695c36ca767df5adfd9bc86f ("Zip / Unzip - File Compression < 10MB"). Then call the same tool with action 'call\_tool', tool\_id 695c36ca767df5adfd9bc86f, and the parameters needed for my request.

The agent should fetch the tool schema first, collect the required parameters for your request, and then call the tool through AgentPMT.

### Dependencies

These products are automatically added when this product is enabled on the page UI.

#### File Management

Upload, list, retrieve, share, download, delete, and manage files stored in AgentPMT cloud storage. This product now owns the full file lifecycle, including signed upload URLs for files up to 10MB and for files over 10MB up to 100MB, budget-scoped file listing with preview URLs, fresh signed download URLs, direct base64 download for smaller files, password-protected sharing, metadata and tag updates, access-history inspection, and expiration extension. All file operations are scoped to the current budget for isolation and are designed to let one budget create persistent files that can be revisited across later agent runs.

- Page URL: https://www.agentpmt.com/marketplace/file-management
- Markdown URL: https://www.agentpmt.com/marketplace/file-management?format=agent-md