ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-UUlib/UUlib.pm
(Generate patch)

Comparing Convert-UUlib/UUlib.pm (file contents):
Revision 1.53 by root, Sat Dec 12 02:03:14 2020 UTC vs.
Revision 1.58 by root, Sun Jan 29 05:04:51 2023 UTC

5use Carp; 5use Carp;
6 6
7require Exporter; 7require Exporter;
8require DynaLoader; 8require DynaLoader;
9 9
10our $VERSION = 1.71; 10our $VERSION = 1.8;
11 11
12our @ISA = qw(Exporter DynaLoader); 12our @ISA = qw(Exporter DynaLoader);
13 13
14our @_consts = qw( 14our @_consts = qw(
15 ACT_COPYING ACT_DECODING ACT_ENCODING ACT_IDLE ACT_SCANNING 15 ACT_COPYING ACT_DECODING ACT_ENCODING ACT_IDLE ACT_SCANNING
871; 871;
88__END__ 88__END__
89 89
90=head1 NAME 90=head1 NAME
91 91
92Convert::UUlib - Perl interface to the uulib library (a.k.a. uudeview/uuenview). 92Convert::UUlib - decode uu/xx/b64/mime/yenc/etc-encoded data from a massive number of files
93 93
94=head1 SYNOPSIS 94=head1 SYNOPSIS
95 95
96 use Convert::UUlib ':all'; 96 use Convert::UUlib ':all';
97 97
106 } 106 }
107 } 107 }
108 108
109=head1 DESCRIPTION 109=head1 DESCRIPTION
110 110
111This module started as an interface to the uulib/uudeview library by Frank
112Pilhofer that can be used to decode all kinds of usenet (and other)
113binary messages.
114
115After upstream abondoned the project, the library was continuously bugfixed
116and improved in this module, with major focuses on security fixes,
117correctness and speed (that does not mean that this library is considered
118safe with untrusted data, but it surely is safer than the original
119uudeview).
120
111Read the file doc/library.pdf from the distribution for in-depth 121Read the file doc/library.pdf from the distribution for in-depth
112information about the C-library used in this interface, and the rest of 122information about the C-library used in this interface, and the rest of
113this document and especially the non-trivial decoder program at the end. 123this document and especially the non-trivial decoder program at the end.
114 124
115=head1 EXPORTED CONSTANTS 125=head1 EXPORTED CONSTANTS
134=head2 Options 144=head2 Options
135 145
136 OPT_VERSION version number MAJOR.MINORplPATCH (ro) 146 OPT_VERSION version number MAJOR.MINORplPATCH (ro)
137 OPT_FAST assumes only one part per file 147 OPT_FAST assumes only one part per file
138 OPT_DUMBNESS switch off the program's intelligence 148 OPT_DUMBNESS switch off the program's intelligence
139 OPT_BRACKPOL give numbers in [] higher precendence 149 OPT_BRACKPOL give numbers in [] higher precedence
140 OPT_VERBOSE generate informative messages 150 OPT_VERBOSE generate informative messages
141 OPT_DESPERATE try to decode incomplete files 151 OPT_DESPERATE try to decode incomplete files
142 OPT_IGNREPLY ignore RE:plies (off by default) 152 OPT_IGNREPLY ignore RE:plies (off by default)
143 OPT_OVERWRITE whether it's OK to overwrite ex. files 153 OPT_OVERWRITE whether it's OK to overwrite ex. files
144 OPT_SAVEPATH prefix to save-files on disk 154 OPT_SAVEPATH prefix to save-files on disk
292if you want to iterate over all items, it is usually faster to use 302if you want to iterate over all items, it is usually faster to use
293C<GetFileList>. 303C<GetFileList>.
294 304
295=item @items = GetFileList 305=item @items = GetFileList
296 306
297Similar to C<GetFileListItem>, but returns all files in one go. 307Similar to C<GetFileListItem>, but returns all files in one go, which is
308very much faster for large number of items, and has no drawbacks when used
309for a small number of items.
298 310
299=back 311=back
300 312
301=head2 Decoding files 313=head2 Decoding files
302 314
590Future versions might enable multicore support for more functions. 602Future versions might enable multicore support for more functions.
591 603
592=head1 BUGS AND LIMITATIONS 604=head1 BUGS AND LIMITATIONS
593 605
594The original uulib library this module uses was written at a time where 606The original uulib library this module uses was written at a time where
595main memory of measured in megabytes and buffer overflows as a security 607main memory was measured in megabytes and buffer overflows as a security
596thign didn't exist. While a lot of security fixes have been applied over 608thing didn't exist. While a lot of security fixes have been applied over
597the years (includign some defense in depth mechanism that can shield 609the years (including some defense in depth mechanism that can shield
598against a lot of as-of-yet undetected bugs), using this library for 610against a lot of as-of-yet undetected bugs), using this library for
599security purposes requires care. 611security purposes requires care.
600 612
601Likewise, file sizes when the uulib library was written were tiny compared 613Likewise, file sizes when the uulib library was written were tiny compared
602to today, so do not expect this library to handle files larger than 2GB. 614to today, so do not expect this library to handle files larger than 2GB,
615certainly not on a 32 bit host.
603 616
604Lastly, this module uses a very "C-like" interface, which means it doesn't 617Lastly, this module uses a very "C-like" interface, which means it doesn't
605protect you from invalid points as you might expect from "more perlish" 618protect you from invalid pointers as you might expect from "more perlish"
606modules - for example, accessing a file item object after callinbg 619modules - for example, accessing a file item object after calling
607C<CleanUp> will likely result in crashes, memory corruption, or worse. 620C<CleanUp> will likely result in crashes, memory corruption, or worse.
608 621
609=head1 AUTHOR 622=head1 AUTHOR
610 623
611Marc Lehmann <schmorp@schmorp.de>, the original uulib library was written 624Marc Lehmann <schmorp@schmorp.de>, the original uulib library was written

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines