Name : perl-File-LinearRaid
| |
Version : 0.12
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 7.65
| Date : 2024-08-05 17:38:28
|
Group : Development/Libraries/Perl
| Source RPM : perl-File-LinearRaid-0.12-7.65.src.rpm
|
Size : 0.01 MB
| |
Packager : (none)
| |
Summary : Treat multiple files as one large seamless file for reading
|
Description :
This module provides a single-filehandle interface to multiple files, in much the same way that a linear RAID provides a single-device interface to multiple physical hard drives.
This module was written to provide random fixed-width record access to a series of files. For example, in the BitTorrent filesharing protocol, several files are shared as a single entity. The final sizes of the individual files are known, but the protocol only sends fixed-width chunks of data. These chunks are not aligned to file boundaries and can span several physical files, but they are only identified by their overall offset and not by the files they span.
This module was created to provide a layer of abstraction around this kind of storage. Instead of calculating possibly many file offsets, and dividing data into smaller pieces, a simple seek and read (or print) on the abstract filehandle will do the right thing, regardless of how the chunk spans the physical files:
seek $fh, ($chunk_id * $chunk_size), 0; read $fh, my $buffer, $chunk_size;
seek $fh, ($chunk_id * $chunk_size), 0; print $fh $chunk;
This module may prove useful if your physical file system has a low (2G) limit on file sizes, yet you require access and storage for a large amount of data through a single filehandle.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-F/openSUSE_Tumbleweed/noarch |