+@REM @file\r
+@REM This script will exec Brotli tool with -e/-d options.\r
+@REM\r
+@REM Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+@REM This program and the accompanying materials\r
+@REM are licensed and made available under the terms and conditions of the BSD License\r
+@REM which accompanies this distribution. The full text of the license may be found at\r
+@REM http://opensource.org/licenses/bsd-license.php\r
+@REM\r
+@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+@REM\r
+\r
@echo off\r
@setlocal\r
\r
-set LVL=--quality 9\r
+set QLT=-q 9\r
+set INPUTFLAG=0\r
+set ARGS=\r
\r
:Begin\r
if "%1"=="" goto End\r
\r
if "%1"=="-d" (\r
- set ARGS=%ARGS% --decompress\r
+ set INPUTFLAG=1\r
+ set ARGS=%ARGS% %1\r
shift\r
goto Begin\r
)\r
\r
if "%1"=="-e" (\r
+ set INPUTFLAG=1\r
shift\r
goto Begin\r
)\r
\r
if "%1"=="-g" (\r
- set ARGS=%ARGS% --gap %2\r
+ set ARGS=%ARGS% %1 %2\r
shift\r
shift\r
goto Begin\r
)\r
\r
-if "%1"=="-l" (\r
- set LVL=--quality %2\r
+if "%1"=="-o" (\r
+ set ARGS=%ARGS% %1 %2\r
shift\r
shift\r
goto Begin\r
)\r
\r
-if "%1"=="-o" (\r
- set ARGS=%ARGS% --output %2\r
- set INTMP=%2\r
+if "%1"=="-q" (\r
+ set QLT=%1 %2\r
shift\r
shift\r
goto Begin\r
)\r
\r
-set ARGS=%ARGS% --input %1\r
+if %INPUTFLAG% == 1 (\r
+ set ARGS=%ARGS% -i %1\r
+ set INPUTFLAG=0\r
+) else (\r
+ set ARGS=%ARGS% %1\r
+)\r
shift\r
goto Begin\r
\r
:End\r
-Brotli %ARGS% %LVL%\r
-@echo on\r
\ No newline at end of file
+Brotli %ARGS% %QLT%\r
+@echo on\r