Meta's Superpack: Pushing the limits of compression in Facebook’s mobile apps
Original post Superpack: Pushing the limits of compression in Facebook’s mobile apps
Article Summary
Sapan Bhatia reveals how Facebook built Superpack, a compression tool that combines compiler analysis with data compression to achieve what traditional tools couldn't. The result? Over 20% smaller Android apps for billions of users.
Facebook's mobile apps were growing too fast for standard compression tools to keep up. Every code check-in added bits to downloads, threatening user experience especially in bandwidth-limited regions. Their solution required rethinking compression from the ground up.
Key Takeaways
- Superpack achieves 20%+ size reduction vs standard Zip compression across Facebook's Android apps
- Combines compiler techniques (AST parsing, SMT solvers) with modern compression algorithms
- Groups code by structure to find longer repeating sequences and reduce pointer sizes
- Uses opcode context to improve entropy coding, reducing bits needed per address
- Successfully deployed across Facebook, Instagram, WhatsApp, and Messenger
By treating compression as a compiler problem and leveraging code structure knowledge, Superpack cuts Android app sizes by over 20% compared to traditional methods, saving bandwidth for billions of users worldwide.
Continue reading
This page summarizes “Superpack: Pushing the limits of compression in Facebook’s mobile apps” by Meta, published Sep 13, 2021. All credit for the original work goes to the authors.