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.45 by root, Thu Feb 27 04:24:13 2020 UTC vs.
Revision 1.46 by root, Fri Feb 28 06:57:25 2020 UTC

214again. 214again.
215 215
216On my machine, a fairly complete decode with DBI backend needs about 10MB 216On my machine, a fairly complete decode with DBI backend needs about 10MB
217RSS to decode 20000 files. 217RSS to decode 20000 files.
218 218
219=over 4 219=over
220 220
221=item Initialize 221=item Initialize
222 222
223Not normally necessary, (re-)initializes the library. 223Not normally necessary, (re-)initializes the library.
224 224
229 229
230=back 230=back
231 231
232=head2 Setting and querying options 232=head2 Setting and querying options
233 233
234=over 4 234=over
235 235
236=item $option = GetOption OPT_xxx 236=item $option = GetOption OPT_xxx
237 237
238=item SetOption OPT_xxx, opt-value 238=item SetOption OPT_xxx, opt-value
239 239
241 241
242See the C<OPT_xxx> constants above to see which options exist. 242See the C<OPT_xxx> constants above to see which options exist.
243 243
244=head2 Setting various callbacks 244=head2 Setting various callbacks
245 245
246=over 4 246=over
247 247
248=item SetMsgCallback [callback-function] 248=item SetMsgCallback [callback-function]
249 249
250=item SetBusyCallback [callback-function] 250=item SetBusyCallback [callback-function]
251 251
255 255
256=back 256=back
257 257
258=head2 Call the currently selected FNameFilter 258=head2 Call the currently selected FNameFilter
259 259
260=over 4 260=over
261 261
262=item $file = FNameFilter $file 262=item $file = FNameFilter $file
263 263
264=back 264=back
265 265
266=head2 Loading sourcefiles, optionally fuzzy merge and start decoding 266=head2 Loading sourcefiles, optionally fuzzy merge and start decoding
267 267
268=over 4 268=over
269 269
270=item ($retval, $count) = LoadFile $fname, [$id, [$delflag, [$partno]]] 270=item ($retval, $count) = LoadFile $fname, [$id, [$delflag, [$partno]]]
271 271
272Load the given file and scan it for encoded contents. Optionally tag it 272Load the given file and scan it for encoded contents. Optionally tag it
273with the given id, and if C<$delflag> is true, delete the file after it 273with the given id, and if C<$delflag> is true, delete the file after it
302 302
303=back 303=back
304 304
305=head2 Decoding files 305=head2 Decoding files
306 306
307=over 4 307=over
308 308
309=item $retval = $item->rename($newname) 309=item $retval = $item->rename ($newname)
310 310
311Change the ondisk filename where the decoded file will be saved. 311Change the ondisk filename where the decoded file will be saved.
312 312
313=item $retval = $item->decode_temp 313=item $retval = $item->decode_temp
314 314
317 317
318=item $retval = $item->remove_temp 318=item $retval = $item->remove_temp
319 319
320Remove the temporarily decoded file again. 320Remove the temporarily decoded file again.
321 321
322=item $retval = $item->decode([$target_path]) 322=item $retval = $item->decode ([$target_path])
323 323
324Decode the file to it's destination, or the given target path. 324Decode the file to its destination, or the given target path.
325 325
326=item $retval = $item->info(callback-function) 326=item $retval = $item->info (callback-function)
327 327
328=back 328=back
329 329
330=head2 Querying (and setting) item attributes 330=head2 Querying (and setting) item attributes
331 331
332=over 4 332=over
333 333
334=item $state = $item->state 334=item $state = $item->state
335 335
336=item $mode = $item->mode([newmode]) 336=item $mode = $item->mode ([newmode])
337 337
338=item $uudet = $item->uudet 338=item $uudet = $item->uudet
339 339
340=item $size = $item->size 340=item $size = $item->size
341 341
342=item $filename = $item->filename([newfilename}) 342=item $filename = $item->filename ([newfilename})
343 343
344=item $subfname = $item->subfname 344=item $subfname = $item->subfname
345 345
346=item $mimeid = $item->mimeid 346=item $mimeid = $item->mimeid
347 347
351 351
352=back 352=back
353 353
354=head2 Information about source parts 354=head2 Information about source parts
355 355
356=over 4 356=over
357 357
358=item $parts = $item->parts 358=item $parts = $item->parts
359 359
360Return information about all parts (source files) used to decode the file 360Return information about all parts (source files) used to decode the file
361as a list of hashrefs with the following structure: 361as a list of hashrefs with the following structure:
375Usually you are interested mostly the C<sfname> and possibly the C<partno> 375Usually you are interested mostly the C<sfname> and possibly the C<partno>
376and C<filename> members. 376and C<filename> members.
377 377
378=back 378=back
379 379
380=head2 Functions below not documented and not very well tested 380=head2 Functions below are not documented and not very well tested - feedback welcome
381 381
382 QuickDecode 382 QuickDecode
383 EncodeMulti 383 EncodeMulti
384 EncodePartial 384 EncodePartial
385 EncodeToStream 385 EncodeToStream
389 389
390=head2 EXTENSION FUNCTIONS 390=head2 EXTENSION FUNCTIONS
391 391
392Functions found in this module but not documented in the uulib documentation: 392Functions found in this module but not documented in the uulib documentation:
393 393
394=over 4 394=over
395 395
396=item $msg = straction ACT_xxx 396=item $msg = straction ACT_xxx
397 397
398Return a human readable string representing the given action code. 398Return a human readable string representing the given action code.
399 399
558 558
559 print "cleanup...\n"; 559 print "cleanup...\n";
560 560
561 CleanUp; 561 CleanUp;
562 562
563=head1 PERLMULTICORE SUPPORT
564
565This module supports the perlmulticore standard (see
566L<http://perlmulticore.schmorp.de/> for more info) for the following
567functions - generally these are functions accessing the disk and/or using
568considerable CPU time:
569
570 LoadFile
571 $item->decode
572 $item->decode_temp
573 $item->remove_temp
574 $item->info
575
576The perl interpreter will be reacquired/released on every callback
577invocation, so for performance reasons, callbacks should be avoided if
578that is costly.
579
580Future versions might enable multicore support for more functions.
581
563=head1 BUGS AND LIMITATIONS 582=head1 BUGS AND LIMITATIONS
564 583
565The original uulib library this module uses was written at a time where 584The original uulib library this module uses was written at a time where
566main memory of measured in megabytes and buffer overflows as a security 585main memory of measured in megabytes and buffer overflows as a security
567thign didn't exist. While a lot of security fixes have been applied over 586thign didn't exist. While a lot of security fixes have been applied over

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines