[Zip-bomb][1] (concept [here][2]), seems quite a "smart" and easy threat to the internet. Well, every website, where you can upload `.zip` file is under a threat I think (or at least to make a damage to it). So, you upload i.e. 100 kb file to site, and it (if site extracts) the file, then it runs out of resources (causing the consequent possible vulnerabilities and damages). Anti-viruses are said to detect such zip-bombs, according the recursion depth and common patterns, but I think that someone might just create 1 text file (without recursive compression) of 1000 GB, and compress it directly into 100kb .zip file. 1) How can we recognize (detect) such files on our servers (without extracting)? 2) Another layer of attack seems sending the "REQUEST" with [GZIP-BOMB][3] . How to protect against it? **Note: solutions for PHP, JAVA, ASP will be welcomed.** [1]: https://unforgettable.dk/ [2]: https://theverybeststories.blogspot.com/2012/10/how-45-petabytes-can-be-compressed-to.html [3]: https://security.stackexchange.com/questions/151993/what-are-some-possible-uses-of-a-zip-bomb