This is a new script for 010 Editor. Like my XORSelection.1sc script, it encodes/decodes with the XOR operator.
The encoding method is as follows: the values of byte 1 and 2 are XORed and the result is stored as byte 2. Then this result (byte 2) is XORed with the value of byte 3, and that result is stored as byte 3. This goes on until all selected bytes are encoded.
Decoding is similar, but from right to left.
The script takes 2 parameters:
- Moving XOR is performed from left-to-right (L) or from right-to-left (R).
- The offset of the “previous” byte to XOR with the current byte (default -1).