The best way is probably to just to decode the string. However, if really necessary, it is possible to do this on the fly instead of a full decode followed by a search. You'll have to implement your one search and just decode only that part that you are currently inspecting. This is most likely only useful if you have very very big strings that you really do not want to (or cannot) store twice in memory.
If the string you search for is long enough, you can also encode that string three times with with different padding (e.g. '', 'x' and 'xx') and search for those without the first 4 and last 4 characters (you don't want to match the padding). When you find a match, you have to make sure the alignment corresponds with the padding and verify that the parts that you didn't match yet (due to the padding) are also in place. The latter does require some decoding, of course.