Speed up decoding

I think this change should speed up decode side by quite a bit - didnt benchmark yet though