← 返回
未分类 中文

Pilot Compress

Transparent compression for large messages over the Pilot Protocol network. Use this skill when: 1. You need to reduce bandwidth for large payloads 2. You wa...
在 Pilot 协议网络上实现大消息的透明压缩。适用于:1. 需要为大负载降低带宽;2....
teoslayer
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 369
下载
💾 0
安装
1
版本
#latest

概述

pilot-compress

Transparent compression for large messages over the Pilot Protocol network. Automatically compresses and decompresses messages to reduce bandwidth usage, enabling efficient transmission of large text payloads, JSON data, and bulk messages.

Commands

Send message (compress manually before sending)

# Compress data before sending
DATA="large text payload here..."
COMPRESSED=$(echo "$DATA" | gzip | base64)
pilotctl --json send-message <hostname> --data "$COMPRESSED"

Send file (compress before sending)

# Compress file before sending
gzip -c largefile.json > largefile.json.gz
pilotctl --json send-file <hostname> largefile.json.gz

Receive and decompress

# Receive compressed data
INBOX=$(pilotctl --json inbox)
COMPRESSED_DATA=$(echo "$INBOX" | jq -r '.items[0].content')
echo "$COMPRESSED_DATA" | base64 -d | gunzip

Workflow Example

Send large JSON report with compression:

#!/bin/bash
RECIPIENT="agent-b"
REPORT_FILE="analytics-report.json"

# Check original file size
ORIGINAL_SIZE=$(stat -f%z "$REPORT_FILE" 2>/dev/null || stat -c%s "$REPORT_FILE")
echo "Original size: $(($ORIGINAL_SIZE / 1024)) KB"

# Compress file
gzip -c "$REPORT_FILE" > "$REPORT_FILE.gz"

# Check compressed size
COMPRESSED_SIZE=$(stat -f%z "$REPORT_FILE.gz" 2>/dev/null || stat -c%s "$REPORT_FILE.gz")
echo "Compressed size: $(($COMPRESSED_SIZE / 1024)) KB"
echo "Compression ratio: $((ORIGINAL_SIZE / COMPRESSED_SIZE))x"

# Send compressed file
pilotctl --json send-file "$RECIPIENT" "$REPORT_FILE.gz"

# Cleanup
rm "$REPORT_FILE.gz"

Receiver decompresses:

# Receive file
pilotctl --json received

# Decompress received file
gunzip analytics-report.json.gz

# Or for piped data
INBOX=$(pilotctl --json inbox)
echo "$INBOX" | jq -r '.items[0].content' | base64 -d | gunzip > report.json

Compression Formats

  • gzip: Standard, widely compatible (gzip/gunzip)
  • zstd: Better compression, faster (zstd -c file)
  • lz4: Very fast, lower ratios (lz4 file)
  • brotli: Excellent for text (brotli file)

Dependencies

Requires pilot-protocol skill with running daemon and compression libraries (gzip, zstd, lz4, brotli).

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 13:55 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装后可防止您和您的用户受到提示注入、数据泄露及恶意行为的侵害。
★ 116 📥 31,022
it-ops-security

Free Ride - Unlimited free AI

shaivpidadi
管理OpenClaw的OpenRouter免费AI模型,自动按质量排名模型,配置速率限制备用方案,并更新opencla...
★ 472 📥 78,580
ai-agent

Pilot Task Parallel

teoslayer
将任务分发给多个代理并合并结果。适用场景:1. 需要将独立工作分配给多个代理;2. 希望汇总各代理的结果。
★ 0 📥 521