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

Comparing Algorithm-FEC/FEC.pm (file contents):
Revision 1.7 by root, Sat Sep 13 21:58:36 2003 UTC vs.
Revision 1.8 by root, Mon Jun 21 13:07:52 2004 UTC

34 34
35require XSLoader; 35require XSLoader;
36 36
37no warnings; 37no warnings;
38 38
39$VERSION = 0.4; 39$VERSION = 0.5;
40 40
41XSLoader::load Algorithm::FEC, $VERSION; 41XSLoader::load Algorithm::FEC, $VERSION;
42 42
43=item $fec = new data_blocks, encoded_blocks, blocksize 43=item $fec = new data_blocks, encoded_blocks, blocksize
44 44
63file. 63file.
64 64
65=back 65=back
66 66
67If your data is not of the required size (i.e. a multiple of C<blocksize> 67If your data is not of the required size (i.e. a multiple of C<blocksize>
68bytes), then you must pad it (e.g. with zero bytes) on encoding, and 68bytes), then you must pad it (e.g. with zero bytes) on encoding (and you
69truncate it after decoding. 69should truncate it after decoding). Otherwise, this library croaks.
70
71Future versions might instead load the short segment into memory or extend
72your scalar (this might enable nice tricks, like C<$fec->copy (..., my
73$x)> :). Mail me if you want this to happen.
70 74
71If called without arguments, the internal storage associated with the 75If called without arguments, the internal storage associated with the
72blocks is freed again. 76blocks is freed again.
73 77
74=item $block = $fec->encode (block_index) 78=item $block = $fec->encode (block_index)
145 149
146Utility function that simply copies one block (specified like in 150Utility function that simply copies one block (specified like in
147C<set_encode_blocks>) into another. This, btw., destroys the blocks set by 151C<set_encode_blocks>) into another. This, btw., destroys the blocks set by
148C<set_*_blocks>. 152C<set_*_blocks>.
149 153
154=back
155
150=item COMPATIBILITY 156=head1 COMPATIBILITY
151 157
152The way this module works is compatible with the way freenet 158The way this module works is compatible with the way freenet
153(L<http://freenet.sf.net>) encodes files. Comaptibility to other file 159(L<http://freenet.sf.net>) encodes files. Comaptibility to other file
154formats or networks is not know, please tell me if you find more examples. 160formats or networks is not know, please tell me if you find more examples.
155 161

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines