This is a little desktop application for Windows that allows to code and econde files with the RLE algorithm, where the functions are built with a lexical analyser (Flex) and compiled with it to give C functions. The latter are compiled with GCC and the exec resulting files are used in the python application.
- "LEXcode.l" : lex file that contains the coding function.
- "LEXdecode.l" : lex file that contains the decoding function.
- "main.py" : Python script that contains a GUI built with tkinter module, shell commands to compile the LEX files besides the compilation of the C files (with GCC) generated from the first compiltion, the latter generates the executable programms "Code.exe" and "Decode.exe".
- Download win_flex_bison zip file available in this repo.
- Unzip the file.
- Copy the directory of the folder then go to environment variables->system variables->path->edit->new and paste it there. (Note that you will need to restart the computer for it to work).
- Move to your working directory, execute the python script, click on "Encode" for example, choose your file and the resulting file will appear in the same folder of your origin file named "encodedFile.txt".
The following files will appear after the execution:
- "code.c" : the resulting C file obtained after compiling the "LEXcode.l" file with flex.
- "decode.c" : the resulting C file obtained after compiling the "LEXdecode.l" file with flex.
- "code.exe"
- "decode.exe"