# PageSpeed Optimization Libraries are a set of C++ classes that automatically optimize web pages and resources they use, using a server-independent framework. The libraries are open-source, and we welcome any [community contributions](http://code.google.com/p/modpagespeed/)!

## Three steps to working with the APIs

[![](https://www.google.com/images/icons/feature/filedownload-r64.png)](http://code.google.com/p/modpagespeed/wiki/HowToBuild)

### Install


The first step to use PSOL is to build mod_pagespeed from source.
Note that this will build the Apache module, but we will not be
using Apache or the module for PSOL or our sample application.
Curent limitations on the build system employed by PSOL make it
necessary to first compile mod_pagespeed.

Instructions can be found on the mod_pagespeed wiki under
[HowToBuild](http://code.google.com/p/modpagespeed/wiki/HowToBuild).
Once you have completed that step enter the commands:

```
  cd INSTALL_DIR/src/pagespeed/automatic
  make all
```
This will generate the library `pagespeed_automatic.a` in the current directory. [![](https://www.google.com/images/icons/product/pagespeed-64.png)](http://code.google.com/p/modpagespeed/source/browse/trunk/src/pagespeed/automatic/static_rewriter.cc)

### Use the sample application as a reference

The mod_pagespeed source has a [directory](http://code.google.com/p/modpagespeed/source/browse/trunk/src/pagespeed/automatic/) containing a simple integration with the PageSpeed Optimization
Libraries. In it, please look at the [Makefile](http://code.google.com/p/modpagespeed/source/browse/trunk/src/pagespeed/automatic/Makefile), [main class](http://code.google.com/p/modpagespeed/source/browse/trunk/src/pagespeed/automatic/static_rewriter.cc), and [main program](http://code.google.com/p/modpagespeed/source/browse/trunk/src/pagespeed/automatic/static_rewriter_main.cc).
[![](https://www.google.com/images/icons/feature/info-b64.png)](http://modpagespeed.com/psol/hierarchy.html)

### Read the APIs

The class library documentation can be found in the [API docs](http://modpagespeed.com/psol/hierarchy.html).