Skip to content

OpenMP and CUDA optimizations of Huffman text compression written in C++

Notifications You must be signed in to change notification settings

qu4lizz/huffman-compression-optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithm optimization - Huffman compression

Description

The Huffman coding algorithm is a lossless data compression algorithm. It works by assigning variable-length codes to each symbol based on their frequency of occurrence in the input text. More frequent symbols get shorter codes, while less frequent ones get longer ones, so the resulting compressed text is a more efficient representation of the input text.

Usage

The build.sh script is used to compile the source code of all attached source code files. The executable file without optimization is compiled without the compiler optimization flag, so it uses the -O0 default optimization flag.

The run.sh script is used to run all executables. It takes as arguments the input file and the name of the output file without the extension, because it assigns the extension depending on which executable is launched:

  • .out - no optimization
  • .cuda - CUDA
  • .omp - OpenMP
  • .cuda_omp - a combination of CUDA and OpenMP.
If no arguments are passed, it uses default file.

About

OpenMP and CUDA optimizations of Huffman text compression written in C++

Topics

Resources

Stars

Watchers

Forks