Hardcode V4 sizes
Reduce stack space used by putBitToPos function.
Replace min() function with a macro.
Statically allocate arrays in EncodeData and hardcode sizez based on -DMAX_REQUIRED_QR_VERSION