Back to index

plone3  3.1.7
__init__.py
Go to the documentation of this file.
00001 '''\
00002 Preprocess resource files by applying compression on them
00003 '''
00004 
00005 __all__ = ('compress', )
00006 
00007 from javascript import compress as compress_javascript
00008 
00009 def compress(data, content_type, compress_level):
00010     'Returns compressed text for a given content type'
00011     assert content_type == 'application/x-javascript', \
00012         'Only application/x-javascript content types are supported.'
00013     return compress_javascript(data, compress_level)