Added an executable "build" to get a Naive encoding of SOLCA, which just outputs the grammar rules in an unsigned integer sequence.
Note that solca assumes byte characters each of which uses an integer in 0 ~ 255, and variables use integers starting from 256.
$ ./build --input_file=string --output_file=string [options] ...
options:
-i, --input_file input file name (string)
-o, --output_file output file name (string)
-e, --erase_br erase line break (bool [=0])
-?, --help print this message
Original README of solca below
solca
This program is a space-optimal version of grammar compression called FOLCA [1].
The detail is showed in A Space-Optimal Grammar Compression [2].
This program uses RSDic as a part of the data structure.
download and compile
$ git clone https://github.com/tkbtkysms/solca.git
$ cd solca/src/
$ make
executions
compression
$ ./compress --input_file=string --output_file=string [options] ...
options:
-i, --input_file input file name (string)
-o, --output_file output file name (string)
-e, --erase_br erase line break (bool [=0])
-?, --help print this message
decompression
$ ./decompress --compressed_file=string --output_file=string [options] ...
options:
-i, --compressed_file compressed file name (string)
-o, --output_file output file name (string)
-?, --help print this message
FOLCA: [1].
FOLCA+: FOLCA applying SOLCA's dynamic succinct tree.
SOLCA: Seciton 3.3 of [2].
SOLCA+CRD: Section 4 of [2] โ this implementation.
LZD: the patricia tree space construction of https://github.com/kg86/lzd.
Re-Pair: https://github.com/nicolaprezza/Re-Pair.