-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
68 lines (57 loc) · 2.44 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
DESCRIPTION
-----------
This archive contains an ANSI C library of functions implementing [7, 4]
Hamming encode and decode operations. These implementations attempt to strike
a reasonable comprise between readability, adaptability speed, and memory usage.
There are two implementations for Hamming encoding, one that uses matrix
multiplication and one that uses a lookup table. The lookup table version is
smaller and faster, but I used the matrix version to come up with the table for
the table version.
There are three implementations for Hamming decoding, one that uses matrix
multiplication, one that uses a lookup table and one that uses a packed lookup
table. The packed table version is smaller, but slower than the table version,
and both versions are smaller and faster than the matrix version, but I used
the matrix version to come up with the tables for the table versions.
More information on Hamming encoding and decoding may be found at:
https://michaeldipperstein.github.io/hamming.html
FILES
-----
COPYING - Rules for copying and distributing GPL software
COPYING.LESSER - Rules for copying and distributing LGPL software
hamming.c - Hamming encode and decode functions
hamming.h - Prototypes for encode and decode functions
LICENSE - GNU Lesser General Public License (LGPL)
Makefile - makefile for this project (assumes gcc compiler and GNU make)
README - this file
testall.c - Source for verifying routines and generating encode and
decode lookup tables.
BUILDING
--------
To build these files with GNU make and gcc:
1. Windows users should define the environment variable OS to be Windows or
Windows_NT. This is often already done.
2. Enter the command "make" from the command line.
USAGE
-----
Usage: testall <options>
options:
D : Generate decode tables
E : Generate encode table
Default usages with no options tests all functions.
HISTORY
-------
12/29/04 - Initial release
10/24/05 - Corrected errors in decode matrices pointed out by Ivan Piasini
- Added test that verifies all single bit errors are correctly
decoded.
08/29/07 - Licensed explicitly under LGPL version 3.
TODO
----
- Add code to build code (C) and parity check (H) matrices from a definition
of parity bits.
- Generalize for schemes other than (7, 4).
AUTHOR
------
Michael Dipperstein ([email protected])
https://michaeldipperstein.github.io