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 This week: 1All time: 4,087 This week: 560Up
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: 45
All time rank: 192 in Italy Italy
Week rank: 106 Down3 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.

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:1
All time:4,087
This week:560Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:65%StarStarStarStar
Rank:576