encoder is almost ready - will check sse extensions for faster XORs