Algorithm::Hamming::Perl

Algorithm::Hamming::Perl is a Perl implementation of ECC Hamming encoding, for single bit auto error correction.
Download

Algorithm::Hamming::Perl Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Brendan Gregg
  • Publisher web site:
  • http://search.cpan.org/~bdgregg/Net-SnoopLog-0.12/SnoopLog.pm

Algorithm::Hamming::Perl Tags


Algorithm::Hamming::Perl Description

Algorithm::Hamming::Perl is a Perl implementation of ECC Hamming encoding, for single bit auto error correction. Algorithm::Hamming::Perl is a Perl implementation of ECC Hamming encoding, for single bit auto error correction.SYNOPSISuse Algorithm::Hamming::Perl qw(hamming unhamming);$code = hamming($data); # Encode $data$data = unhamming($code); # Decode and fix errors ($data,$errors) = unhamming($code); # + return error countThis is an Error Correction Code module, implementing Hamming encoding (8 bits data, 4 bits Hamming - ie increases data size by 50%). Data can be encoded so that single bit errors within a byte are auto-corrected.This may be useful as a precaution before storing or sending data where single bit errors are expected.Hamming encoding was invented by Richard Hamming, Bell Labs, during 1948.EXPORT SUBROUTINEShamming (SCALAR)Returns the Hamming code from the provided input data.unhamming (SCALAR)Returns the original data from the provided Hamming code. Single bit errors are auto corrected.unhamming_err (SCALAR)Returns the original data from the provided Hamming code, and a number counting the number of bytes that were corrected. Single bit errors are auto corrected.OTHER SUBROUTINESAlgorithm::Hamming::Perl::hamming_faster ()This is an optional subroutine that will speed Hamming encoding if it is run once at the start of the program. It does this by using a larger (hash) cache of preprocessed results. The disadvantage is that it uses more memory, and can add several seconds to invocation time. Only use this if you are encoding more than 1 Mb of data.Requirements:· Perl· ExtUtils::MakeMakerINSTALLATION perl Makefile.PL make make test make install


Algorithm::Hamming::Perl Related Software