A simple Binary-Encoder in C#