The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

text-lossy - lossy text compression via entropy reduction

SYNOPSIS

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

OPTIONS

help

Show this help.

version

Show the version of this program.

filter

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.

available-filters

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.

1, 2, 3

Various presets that choose from sensible filter lists. Generally, higher numbers will compress better.

2l, 3l

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.

paragraph

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.

DESCRIPTION

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.

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

BUGS

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.

SEE ALSO

Text::Lossy(3pm)

AUTHOR

Ben Deutsch, <ben at bendeutsch.de>

LICENSE AND COPYRIGHT

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.