salvo-compression

Compress Salvo web responses with gzip, brotli, zstd, or deflate.

20|5|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/salvo-rs/salvo-skills --skill salvo-compression
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: salvo-compression
Source: https://github.com/salvo-rs/salvo-skills/tree/main/skills/salvo-compression
Command: npx skills add https://github.com/salvo-rs/salvo-skills --skill salvo-compression

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Compresses Salvo responses to reduce bandwidth and speed up content delivery across clients by enabling gzip, brotli, zstd, and deflate.

Core Features & Use Cases

  • Flexible algorithm support: gzip, brotli, zstd, and deflate can be enabled individually or in combination.
  • Per-route and global configuration: set min_length, content types, and prioritization to tailor compression.
  • Real-world use: reduce bandwidth for HTML, JSON, CSS, and JS endpoints in Salvo-based services.

Quick Start

Enable a Compression hoop on your Salvo Router and configure desired algorithms and thresholds.

Frequently Asked Questions about salvo-compression

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable HTTP compression in a Salvo web application?▼

To enable HTTP compression in a Salvo web application, add a Compression hoop to your Router and use Compression::new() to configure algorithms, min_length thresholds, and content type restrictions.

What compression algorithms can I use to reduce bandwidth in Salvo responses?▼

You can reduce bandwidth in Salvo responses by enabling gzip, brotli, zstd, and deflate compression algorithms individually or in combination for HTML, JSON, CSS, and JavaScript content.

Can I configure per-route compression settings for different Salvo endpoints?▼

Yes, Salvo compression supports both per-route and global configuration, allowing you to set specific min_length thresholds, content types, and algorithm prioritization for different endpoints.

Does Salvo support brotli and zstd compression for HTTP responses?▼

Yes, Salvo supports brotli and zstd compression alongside gzip and deflate for HTTP responses, configurable through the Compression::new() method for flexible algorithm prioritization.

How do I restrict HTTP compression to specific content types in Salvo?▼

To restrict HTTP compression in Salvo, configure the Compression hoop to limit compression to specific content types like HTML, JSON, CSS, and JavaScript, and set a min_length threshold.