Alfresco documents are stored as a conventional file in a file system, and a set of metadata held in a database management system.
Have you looked at storing your files on a file system that does the compression on the fly? Typically, documents need to be uncompressed during the first few hours of storage, while the indexing methods work through the file. Once the full-text-search indexes are compiled, the document will not likely be read again for quite awhile, so they can safely be compressed.