C# Class implementation of LZ-String javascript