C# 市场数据解压
我正在尝试使用xceedziplib.dll版本4.2解压缩MCX市场数据,但无法解压缩。在解压缩数据时,我遇到了无效的加密密码错误 如果有任何其他方法可用于解压缩MCX市场数据,请留下您的评论C# 市场数据解压,c#,C#,我正在尝试使用xceedziplib.dll版本4.2解压缩MCX市场数据,但无法解压缩。在解压缩数据时,我遇到了无效的加密密码错误 如果有任何其他方法可用于解压缩MCX市场数据,请留下您的评论 Console.WriteLine("Waiting for data.."); byte[] tmpData = client.Receive(ref localEp); string pure1 = Sy
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|M!@#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));
Console.WriteLine(“等待数据…”);
字节[]tmpData=client.Receive(参考localEp);
stringpure1=System.Text.Encoding.ASCII.GetString(tmpData,0,tmpData.Length);
控制台写入线(pure1);
字符串长度=System.Text.Encoding.ASCII.GetString(tmpData,0,5);
int lengthString=Convert.ToInt32(长度);
字节[]m_compressedData=新字节[lengthString];
对于(inti=6;i不要复制从索引6开始的字节。应该从索引5开始复制