Refactor run-length encoding's command-line functionality