Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

MongoMinify (1.1-dev)

Build Status Total Downloads Latest Stable Version Dependency Status Bitdeli Badge [Say Tahanks]( @marcqualie for making Mongo+Minify:

MongoMinify is a drop-in library which acts as a transparent filter to MongoDB documents and compresses/decompresses data on the fly. PSR-2 compliant and works with PHP 5.3+.

Getting started

You should check out the Getting Started page on the Wiki to get up and running

Quick Instalation

The best way to install this library is via composer.

    "require": {
        "marcqualie/mongominify": "dev-master"

Why MongoMinify?

As great as MongoDB is at so many things, it has a downside compared to other data stores that it stores it's keys wih every document. These keys quickly add up and sometimes double or even triple the amount of storage required. Myself and many other developers got around this by adding single letter key names, but this is hard to manage with large projects and documents. MongoMinify gets around this problem by transparently converting documents as they are transfered between the client and the database leaving readable code with compressed storage.


  • PHP 5.3+
  • MongoDB PHP Driver 1.3+


The aggregation framework is very complex with a lot of use cases. I've tried to tackle it as best I can and it works for every use case I've come across. If you find a bug with minification while using the aggregtation framework, please create report it using Github Issues.

Feedback / Contributing

Feedback and pull requests on Github are always welcome and encouraged.


A drop in replacement for the native MongoDB PHP Driver which transparently translates data in and out of mongo for smaller storage sizes




No packages published