Coder Social home page Coder Social logo

dkorenci / cfg-esa Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 42 KB

Text compression using an algorithm for longest first context free grammar compression based on enhanced suffix array

License: GNU General Public License v3.0

Makefile 2.96% Shell 2.95% C++ 93.28% C 0.81%

cfg-esa's Introduction

This is cfg_esa - text compression tool using an algorithm for longest first  
context free grammar compression based on enhanced suffix array, described in the article:
Ristov, S and Korenčić, D., “Using Static Suffix Array in Dynamic Application: 
Case of Text Compression by Longest First Substitution”, 
Information Processing Letters, DOI 10.1016/j.ipl.2014.08.014

Copyright (C) 2014-2015 Damir Korencic

cfg_esa is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

The code in SaIsCreator.hpp is modified code from taken from the text of the article:
Two Efficient Algorithms for Linear Time Suffix Array Construction, by Ge Nong, Sen Zhang, and Wai Hong Chan
Authors version is available online under MIT licence at: http://code.google.com/p/ge-nong/

cfg_esa is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.


*** Usage:

"make" produces cfg_esa executable
use "make clean" to clean the build

Running cfg_esa with no parameters will print help message with usage instructions.

The output of the compression consists of all the rules of the compressed grammar 
and the first rule R0 corresponds to the entire string (line [R0]:string).
If the input string is read from a file, use -w option to ignore whitespaces, 
otherwise newlines and other whitespace chars will be included in the string.

scripts/ folder contains bash scripts that can be used for testing, 
usage of the scripts is documented in the code comments

Test cases can be found in: src/test/tests.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.