Datatable_Itemcharge.ies is the one which I will be talking about for now
Datatable so obviously its table format, opens up first with the "IDSpace" which in the example is ItemCharge
Now I will start with the contents of the file.
Numeric Values are stored as Float
ASCII now it just seems jumbled up however heres an algorithm to "decrypt" it (I use it in a program I made to read this file)
VB6 Code:
Code: Select all
Public Function Decode(ByVal TmpString As String)
If TmpString <> "" Then
TmpString = Asc(TmpString)
If TmpString Mod 2 Then
TmpString = TmpString - 1
Else
TmpString = TmpString + 1
End If
TmpString = Chr(TmpString)
End If
Decode = TmpString
End Function
Other Information
http://i64.photobucket.com/albums/h193/ ... creen1.jpg
Reverse the Hex (FF 17 00 00) to 000017FF = FileSize (6143 - Not a Float)
http://i64.photobucket.com/albums/h193/ ... creen2.jpg
Reverse the hex again, this gives you the number of Rows
http://i64.photobucket.com/albums/h193/ ... creen3.jpg
Number of Columns
http://i64.photobucket.com/albums/h193/ ... creen4.jpg
Number of Columns which contain a Numeric Value (So the Data will be stored as a 4 byte float value)
http://i64.photobucket.com/albums/h193/ ... creen5.jpg
Number Of Columns which contain a string
Then its got an extra 2 byte of Null and probably the third Null is a terminator for data.
Each Column name is placed twice. (So I pretty much ignore the second time the Column Name gets mentioned)
First Column Name starts at 93 byte, next one is Last Column Name Start + 134 (So it would be 93 + 134 for next start of next name then 93 + 134 + 134 for the third etc)
There is a bit of Null padding however before some of the column names it will be 01, 02 etc (Depends sometimes theres not a single one) and I'm not sure what they are meant to represent.
The last Column location + 140 = where data starts
Now the main problem is there are some things at the start just before FileSize i got no idea represent and I can not work out what they mean at all.
Next is when it hits the data in the example its the float first now its easy to get how many bytes i should read for it before the text but I'm not sure which go into which columns, after the data has been read I do not know how to get where the next piece starts.
If you look at the other IES i attached called datatable_item_consume.ies you can see that the first data in it is String then it comes to float so there has to be some indicators around which Currently I can not see.
My very messy VB code (The Code has been changed with dynamic arrays and also uses Erase to empty the arrays however the link has not been updated):
http://pastebin.com/f34380d97
Any Help Will Be Appreciated thanks!