Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 1.14 KB

File metadata and controls

25 lines (17 loc) · 1.14 KB

Text Compression & Decompression Algorithm
in C++ and Python

Costa Rica

GitHub brown9804

Last updated: 2020-04-14


This repository contains a text compression and decompression algorithm based on replacements. The algorithm works as follows:

  1. It takes a text file as input and sets a replacement threshold.
  2. For each word whose frequency is equal to or greater than the replacement threshold, it changes its string of characters to another.
  3. It adds a table with each of the replacements in a separate file, indicating the original word and its new string.

The algorithm does not modify the input file. Instead, it creates a new file with the same name as the original but with a .rep extension for the compressed text and a .tab extension for the table of replacements.

Total views

Refresh Date: 2025-07-11