A General Error-Theoretical Analysis Framework for Constructing Compression Strategies