there is a variable holding ``decoded.Length`` in scope, using that is a bit more straight forward IMO.

also add a newline before ``valueLen = ...`` to comform more to the rest of the method