An extremely basic tar file cleaner that takes out specific strings specified from a corrupted tar file and makes a clean copy. This program was made in response to the Team Win Recovery issue 964, and the specific strings removed are specified at the very bottom of the thread. This is not the only tar file cleaner project on GitHub, so make sure to also check out BuildingAtom's Tar File Cleaner as well.
- Check for USTAR indicator
- Parse the header for file name, size, header index, and file buffer size
- Check for leak by checking for the next header's USTAR indicator
- Copy the header and file content if leak check determines no leak.
- If there is a leak, check the file for leaked strings and make sure they don't get copied
- Program doesn't remove any other strings other than the strings specified in TarCleaner.c
- There are 2 executables are located in the Executables folder. SmallerTarCleaner is written in C and cleans files up to 2GB only. BigTarCleaner is written in C++ and can be used for files bigger than 2GB.
- BigTarCleaner requires Microsoft Visual C++ Redistributable for Visual Studio 2017