Skip to content

archiver written in Go (Golang) implements Shannon-Fano algorithm for text data compression

Notifications You must be signed in to change notification settings

RSheremeta/archiver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

archiver

A tiny archiver for text data compression using Shannon-Fano algorithm

Most valuable to large data. Supported formats:

  • txt to txt
  • txt to rtf
  • rtf to txt
  • rtf to rtf

Usage

There are two ways:

  • Clone the repo and build the project using go build
  • Download a released binary here

Archiving

  1. ./archiver pack --method sf <filename> or shorted ./archiver pack -m sf <filename>
  2. This will generate a new compressed file with .sf extension

Unarchiving

  1. ./archiver unpack --method sf <filename> or shorted ./archiver unpack -m sf <filename>
  2. Optional flag: --extension or -e used for decompressing target file to a specific extension
  3. Available options: txt(default), rtf
  4. This will generate a new decompressed file

Examples

Feel free to play around with files in the /examples dir

Efficiency

Depending on a data content compression efficiency could be up to 60%.

Compression and decompression results:

eff-img

About

archiver written in Go (Golang) implements Shannon-Fano algorithm for text data compression

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages