This project implements a basic LZW (Lempel-Ziv-Welch) compression algorithm. Below are the instructions to set up and run the project.
-
Clone the repository and initialize submodules:
git clone https://github.com/ThuanLebk/cpp-compressor.git cd cpp-compressor
-
Update the
googletest
entry in.gitmodules
file to change the URL for the googletest submodule:[submodule "googletest"] path = googletest url = https://github.com/google/googletest.git
-
Update the submodule with the new URL:
git submodule sync git submodule update --init --recursive
-
Navigate to the
googletest
directory and build the project:cd googletest cmake . make
-
Go back to the
build
directory at top-level:cd .. cd build
-
Run CMake to generate the build files and then build the project:
cmake .. make
-
To run the tests:
./bin/LZWTests
-
To compress a file:
./bin/LZWCompressor [input-file-path] [output-file-path]
Replace [input-file-path]
and [output-file-path]
with the actual file paths.
Contributions are welcome! Please open an issue or submit a pull request for any changes or additions.
This project is licensed under the MIT License. See the LICENSE
file for more details.