I tried to rewrite onex explorer in C#
However, the unpacking doesn't work, when it tries to read the file count It always return a wrong number, regardless of big endian or little endian...
Same Issue exists when I try to use HXD to view the filecount.
Here's the C# code I translated from Onex's c++ code
Code:
BinaryReader reader = new BinaryReader(fs);
byte[] header = reader.ReadBytes(10);
MessageBox.Show(Encoding.Default.GetString(header));
/*
* int LittleEndianConverter::fromInt(QByteArray array) {
return qFromLittleEndian<qint32>(reinterpret_cast<const uchar *>(array.data()));
}
*/
int fileAmount = reader.ReadInt32();
MessageBox.Show(fileAmount.ToString());
//OnexTreeItem* item = createItemFromHeader(header, neatFileName(file.fileName()), header);
reader.ReadByte();







