Guides
Compression Strategy
Choose a compression format for your bundle distribution.
Supported Formats
zip- Standard ZIP format (DEFLATE algorithm). Fast compression and decompression.tar.gz- TAR archive with GZIP compression (LZ77 algorithm). ~10-15% smaller than ZIP.tar.br- TAR archive with Brotli compression. ~20-30% smaller than GZIP. Developed by Google for web compression.
Configuration
Set compressStrategy in your hot-updater.config.ts:
import { defineConfig } from 'hot-updater';
export default defineConfig({
// ... other options
compressStrategy: 'tar.gz', // 'zip' | 'tar.gz' | 'tar.br'
});Usage
After setting the compression strategy, deploy your bundle:
npx hot-updater deploy -p ios
npx hot-updater deploy -p androidThe bundle will be compressed and deployed using the specified format.
How it works:
- The client app automatically detects the compression format (ZIP, GZIP, or Brotli) and decompresses accordingly
- Users download the compressed bundle, reducing bandwidth usage
- Choose a format with better compression ratio to minimize download size and save users' data
Recommendation
Since the client handles all formats transparently, choose the format with the best compression ratio (tar.br or tar.gz) to reduce download sizes for your users.