correct last echo
add compression type detection