Zigzag code

In coding theory, a zigzag code is a type of linear error-correcting code introduced by. They are defined by partitioning the input data into segments of fixed size, and adding sequence of check bits to the data, where each check bit is the exclusive or of the bits in a single segment and of the previous check bit in the sequence. The code rate is high: $J/(J + 1)$ where $J$ is the number of bits per segment. Its worst-case ability to correct transmission errors is very limited: in the worst case it can only detect a single bit error and cannot correct any errors. However, it works better in the soft-decision model of decoding: its regular structure allows the task of finding a maximum-likelihood decoding or a posteriori probability decoding to be performed in constant time per input bit.