PHP Classes

GzOutput: Serve compressed files if the browser supports it

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


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: 286 Down15 in Italy Italy Down
Innovation award
Innovation award
Nominee: 5x

  Files folder image Files  
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. 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  
This week:0
All time:4,088
This week:488Up
 User Ratings  
 All time