module Main where

import System.Environment ( getArgs )
import Data.List (isSuffixOf)
import Huffman

main :: IO ()
main = do
    [input,output] <- getArgs
    if ".comp" `isSuffixOf` output
        then encodeFile input output
        else decodeFile input output