Decoded string should be null-terminated.
More comments are better
Improved documentation
Added an example script