PHP Classes

GzOutput: Serve compressed files if the browser supports it

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 65%Total: 853 All time: 4,089 This week: 488Up
Version License PHP version Categories
gzoutput 0.5MIT/X Consortium ...4HTTP, Files and Folders, Compression
Description 

Author

This class can be used to serve one or more files compressing them if the user browser supports compression.

It can serve one or more files in the same request. If the files are Javascript or CSS, they can be processed first to remove needless comments and white space.

If the browser supports compression, the class may compress the files data before serving to the browser.

The resulting data may be stored in a cached directory to avoid processing overhead in subsequent requests of the same data.

The class checks the HTTP request headers to avoid serving data that did not change if the browser has cached the data and it was not changed since last time it was served.

Picture of Andrea Giammarchi
Name: Andrea Giammarchi <contact>
Classes: 17 packages by
Country: Italy Italy
Age: 46
All time rank: 192 in Italy Italy
Week rank: 195 Down9 in Italy Italy Down
Innovation award
Innovation award
Nominee: 5x

  Files folder image Files (5)  
File Role Description
Plain text file gzmanager.php Example configuration file for public static GzOutput::createFromConfig method.
Plain text file GzOutput.class.php Aux. Choose correct class version for different hosting solutions.
Plain text file GzOutput.class4.php Class PH 4 compatible version
Plain text file GzOutput.class5.php Class PHP 5.X compatible version (E_STRICT ready)
Accessible without login HTML file GzOutput.doc.html Doc. How to use this class and static methods with or without automations.

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
Downloadgzoutput-2007-02-20.zip 13KB
Downloadgzoutput-2007-02-20.tar.gz 8KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
SourceMap Download .zip .tar.gz Use this class to map source codes Required
Cruncher class Download .zip .tar.gz Required to remove comments and reduce sorces size Required
 Version Control Unique User Downloads Download Rankings  
 0%
Total:853
This week:0
All time:4,089
This week:488Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:65%StarStarStarStar
Rank:572