2017-06-05 24 views
-3

我想使用xceedziplib.dll 4.2版解壓縮MCX市場數據,但我無法解壓縮我無法加密密碼錯誤,同時不妥協的數據。MCX市場數據解壓

如果任何其他方式可用於解壓縮的MCX市場數據,請留下您的意見...

   Console.WriteLine("Waiting for data.."); 
       byte[] tmpData = client.Receive(ref localEp); 
       string pure1 = System.Text.Encoding.ASCII.GetString(tmpData, 0, tmpData.Length); 
       Console.WriteLine(pure1); 
       string length = System.Text.Encoding.ASCII.GetString(tmpData, 0, 5); 
       int lengthString = Convert.ToInt32(length); 
       byte[] m_compressedData = new byte[lengthString]; 

       for (int i = 6; i <= lengthString; ++i) 
       { 
        m_compressedData[i - 6] = tmpData[i]; 

       } 

       string pure = System.Text.Encoding.ASCII.GetString(m_compressedData, 0, m_compressedData.Length); 
       Console.WriteLine(pure); 

       int offset = 0; 
       int count = m_compressedData.Length; 
       //string password = "FD5A148641A8747669842137CD6B1965"; 
       string password = "oms.123"; 
       object vv = (object)m_compressedData; 
       object cc; 


       n.EncryptionPassword = "MCX|[email protected]#C%^&*={}X<>?"; 
       // byte[] uncompressedData = XceedCompressedStreamEx.Decompress(m_compressedData, offset, count, password); 
       int status =(int)n.Uncompress(ref vv, out cc, true); 
       string b=n.GetErrorDescription(status); 
       byte[] testByte = objectToByteArray(cc); 

       Console.WriteLine(System.Text.Encoding.ASCII.GetString(testByte, 0, testByte.Length)); 

回答

0

不要複製字節開始的6索引您應該複製從5

指數開始