Moving the AstCompressor into its own .scala file

I moved the implementation of the compressor into a separated file as we decided yesterday.