Here is the optimised decoding algorithm in JavaScript.function decode_3R(DEPTH, // Log2(sample number) stream) { // pointer to the array of sample var A=DEPTH-1, // stack pointer C=0, // loop counter R, // checksum register S=1> 1; } out_value(V); out_value(T-V);...