text-lossy - lossy text compression via entropy reduction
text-lossy [-1|-2|-3|--filter <aa,bb,cc>|--paragraph] [file ...]
Options: - help This help - version Version of text-lossy - filter aa,bb,cc Add filters named 'aa', 'bb' and 'cc' to the process This option can also be given more than once - available-filters List of available filters - 1 Preset 1: filter 'lower' - 2 Preset 2: filters 'lower whitespace' - 3 Preset 3: filters 'lower punctuation_sp whitespace' - 2l Same as preset 2, but uses 'whitespace_nl' - 3l Same as preset 3, but uses 'whitespace_nl' - paragraph Read files in paragraph mode
Show this help.
Show the version of this program.
Add one ore more named filters to use for this run. For multiple filters, you can either separate the names with commas, or use the filter option several times.
filter
Returns a list of currently available filters. These names can be passed to the filter option. See Text::Lossy(3pm) or supporting modules for information on the filters.
Various presets that choose from sensible filter lists. Generally, higher numbers will compress better.
Similar to presets 2 and 3, except that newline characters on the end of lines remain newline characters. Most useful if you wish to pipe line-oriented data through text-lossy without causing it to buffer the entire input. May reduce compression efficiency.
2
3
text-lossy
Reads files, or STDIN, in paragraph oriented mode. In this mode, "paragraphs" are separated by one or more blank lines. Most useful in conjunction with the 2l or 3l presets, or the whitespace_nl filter: the output will contain one line per paragraph in the input.
STDIN
2l
3l
whitespace_nl
This script is a straight-forward application of the Perl moduleL <Text::Lossy(3pm)|Text::Lossy> to STDIN or a set of files. Leave the list of files empty to read from STDIN. The results are printed to STDOUT.
STDOUT
Note that this module does not perform the actual compression itself, it merely changes the text so that it may be compressed better. You will most likely need to add some form of actual compression at the end, e.g.
text-lossy -3 mytext.txt | gzip > mytext.txt.gz
None known so far.
Please report any bugs or feature requests to bug-text-lossy at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Text-Lossy. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-text-lossy at rt.cpan.org
Text::Lossy(3pm)
Ben Deutsch, <ben at bendeutsch.de>
<ben at bendeutsch.de>
Copyright 2013 Ben Deutsch.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Text::Lossy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Lossy
CPAN shell
perl -MCPAN -e shell install Text::Lossy
For more information on module installation, please visit the detailed CPAN module installation guide.