false is a performance increase for programs that do not need to display decoded names to the user
true is a performance loss but allows for displaying decoded names to the user
File Method: GetFileBytes(string dataDirectory, int dataId, long offset, int length) added
Returns the collection of bytes that represents a file in the data.*** storage system. (handy for doing hash calculations on the files byte[])
WARNING!!! IMPORTANT!!!
If you have previously included DataCore in an application be mindful that your core.Load(string filePath) will thrown an error as it will need the new overload! (e.g. core.Load(string filePath, bool decodeNames)
Updated functionality of method: UpdateFileEntry()
Originally intended to accept decoded fileName as part of string filePath
Updated to accept encoded fileName as part of string filePath
Added proper encoding to method: GetFileBytes()
WARNING!!! IMPORTANT!!!
If you have previously included DataCore in an application be mindful that your core.Save(ref index, string filePath) will thrown an error as it will need the new overload! (e.g. core.Save(ref index, string filePath, bool encodeNames)
Core.Import/UpdateFileEntry methods switched from OnTotal* events to OnCurrent*
Core.UpdateFileEntry() overload added with argument (ref List blankIndex) to update files while tracking orphaned space
Restructured code in Import/UpdateFileEntry methods
Core.Create() method now reports a totalProgress/totalStatus
Core.Load() method now reports a TotalStatus message and CurrentProgress values
Core.Load() reportInterval (int) argument added, controls amount of bytes to process before reporting position to caller (progress reporting)
Core.Load() overloads for data.000 and data.blk merged
Structures.EventArgs.CurrentEventArgs changed to long from int
IndexEntry class moved from DataCore namepsace to DataCore.Structures
BlankIndexEntry and IndexEntry merged
Core.Save() now reports progress via OnTotal/OnCurrent events
Core.Save() changed from bool to void (bool always returned true)
Core.Save() (all overloads) code optimized
Core.Save() overload added to properly save .blk index as a .000 would be
Added new Core.GetEntriesByDataId() overload to search BlankIndex
Added Core.GetClosestEntry(ref List index, int dataId, int minSize, int maxSize) method to get the closest matching IndexEntry from the data.blk
WARNING!!! The Load/Save arguments have changed since the last release! Make sure to update your project calls to these methods accordingly
This also goes for including the IndexEntry structure into your class, as noted above you can no longer call it by: using DataCore; but instead by adding a new using: using DataCore.Structures;
I am currently working on a program to use the DataCore and I found some bugs:
First and most annoying: while the core runs any function the program doesn't respond.
This leads into problem #2: the progress-Events won't be called.
(This means, that the window can not get focus back - if lost - the button inside the program cant be clicked/focused/whatever else you can do with buttons, any ToolTips won't appear, and progressbars - controlled by the progress-Events - won't change - until the core finished working on his function and is ready again - for example dumping files)
The third bug is that the core.Save-Method always throws a IO.PathNotFound-Exception even if the given path exists.
Dumping, exporting files and building the data.001-8 Files work fine. (I havn't worked with deleting and updating enough to say anything about these functions but as far as I am they are working fine too )
Again big THANKS for the great work!
(I apologize for any grammar/spelling mistakes, but I am not a native speaker)
I am currently working on a program to use the DataCore and I found some bugs:
First and most annoying: while the core runs any function the program doesn't respond.
This leads into problem #2: the progress-Events won't be called.
(This means, that the window can not get focus back - if lost - the button inside the program cant be clicked/focused/whatever else you can do with buttons, any ToolTips won't appear, and progressbars - controlled by the progress-Events - won't change - until the core finished working on his function and is ready again - for example dumping files)
Firstly, you must understand: The DataCore is not multi-threaded by nature this is assumed to be handled inside of your programs code. I suggest using the TASK API.
Example: Task.Run(() => { core.Load(); });
P.S.
Running the function inside a task is the same as using a backgroundworker or thread. If you attempt to directly report event information to a control create on the program thread you will get a "Cross-Thread Operation" exception. So when you write your reporting events do it like so:
this.Invoke can only be used from the base thread the program is started on!
The third bug is that the core.Save-Method always throws a IO.PathNotFound-Exception even if the given path exists.
I guess I left the naming convention here for the path argument a bit ambiguous. The argument: buildPath expects the whole path like (C:/Rappelz/data.000)
Dumping, exporting files and building the data.001-8 Files work fine. (I havn't worked with deleting and updating enough to say anything about these functions but as far as I am they are working fine too )
Again big THANKS for the great work!
(I apologize for any grammar/spelling mistakes, but I am not a native speaker)
Thanks for your concerns if there is anything else I can do to help please let me know.