untar :: MonadThrow m => Conduit S.ByteString m Tar.Entry
untar = do
    s <- CL.consume
    loop $ Tar.read (L.fromChunks s)
  where
    loop (Tar.Next e es) = yield e >> loop es
    loop  Tar.Done       = return ()
    loop (Tar.Fail e)    = throwM e
untar :: MonadThrow m => Conduit S.ByteString m Tar.Entry
untar = do
    s <- CL.consume
    loop $ Tar.read (L.fromChunks s)
  where
    loop (Tar.Next e es) = yield e >> loop es
    loop  Tar.Done       = return ()
    loop (Tar.Fail e)    = throwM e
untar = do
    s <- CL.consume
    loop $ Tar.read (L.fromChunks s)
  where
    loop (Tar.Next e es) = yield e >> loop es
    loop  Tar.Done       = return ()
    loop (Tar.Fail e)    = throwM e