Beispiel #1
0
        private void ParseData(byte[] data)
        {
            Keyword = GetKeyword(data);
            int index = Keyword.Length + 1;

            CompressionMethod = data[index];
            index            += 1;
            Text = Encoding.GetEncoding("ISO-8859-1").GetString(ZlibCompression.Decompress(data.Skip(index).ToArray()));
        }
Beispiel #2
0
 private string ParseInternationalText(byte[] data, int startIndex)
 {
     return(CompressionFlag == 0
         ? Encoding.UTF8.GetString(data, startIndex, data.Length - startIndex)
         : Encoding.UTF8.GetString(ZlibCompression.Decompress(data.Skip(startIndex).ToArray())));
 }