"""
Exemplo de uso apenas do TDLN Compressor
"""
from atomic_agents.core import TDLNCompressor

def main():
    compressor = TDLNCompressor(level="aggressive")
    
    prompts = [
        "Please help me. The goal is to summarize this text.",
        "I would like you to analyze this data. Make sure to check all details.",
        "First, read the file. Second, process the data. Third, generate the report.",
        "For example, you could use this method. In other words, this is the best approach.",
    ]
    
    print("=== Compressão de Prompts ===\n")
    for i, prompt in enumerate(prompts, 1):
        compressed = compressor.compress(prompt)
        original_size = len(prompt)
        compressed_size = len(compressed)
        savings = original_size - compressed_size
        percentage = (savings / original_size * 100) if original_size > 0 else 0
        
        print(f"Prompt {i}:")
        print(f"  Original ({original_size} chars): {prompt}")
        print(f"  Comprimido ({compressed_size} chars): {compressed}")
        print(f"  Economia: {savings} chars ({percentage:.1f}%)\n")

if __name__ == "__main__":
    main()


