The fastest general method to know whether $2^b\bmod k$ is $z$ is to compute it and compare the result to $z$. Your comments seem to suggest that you're not fully aware how fast repeated squaring is for computing $2^b\bmod k$ -- in particular, it is not necessary to calculate $2^b$ explicitly just to find its residue modulo $k$.
Of course, if $b$ is larger than $k$ and you know the factorization of $k$, it may pay to reduce $n$ modulo $\lambda(k)$ or $\phi(k)$ first -- but that, too, is a shortcut for computing $2^b\bmod k$, not something that benefits from knowing your $z$.
There's one situation where you can squeeze a small amount of additional performance out of knowing $z$, namely if after reducing $b$ modulo $\lambda(k)$ you find out that $\lambda(k)-b$ is small compared to $b$. In that case you can rewrite
$$ 2^b \equiv z \pmod k $$
to
$$ 1 \equiv 2^{\lambda(k)-b} z \pmod k $$
But if the initial $b$ is arbitrary, it will only be in a very small fraction of cases that this actually save you any significant exponentiation work.