Enhanced compress function. Avoid compress latest binlog file. Only compress if binlog is equal to max_binlog_size value hasnt being modified in the last 5 minutes