retroclouds, on Tue Mar 23, 2010 5:55 AM, said:
@newcoleco: Are you planning on creating a PC based packer utility like they have for bitbuster ?
I'm just saying in this thread : "I've done some thinkings lately and I wanted to share it with you; it's another compression algorithm and this is the concept behind it. Use it for your projects if you want so, or even adapt the concept for your own needs."
Making a packer will impose to fix the format, it'll also somehow impose to use binary files into Coleco projects, which I don't want to do. But, even if I don't think I'll do one myself, I've no problem if someone else want to make one : the compression algorithm is documented and it can be used "as is" or not.
Why I think that I should not do a general purpose packer based on this format?
A first thing that bugs me about doing a general purpose packer like those done for BitBuster, RNC2, and many more is about generating binary files. Using binary files into a format that maybe will change or simply not survive the test of time is, in my opinion, not a good idea. A file written in a way to give the key for using these encoded data is more appealing to me than a binary file that doesn't say much except "I look like garbage because I need to be decoded". Also, it may sounds strange to you but the way I'm programming my games doesn't use binary files, but generated C and ASM listings made by tools like those to convert pictures and make charsets. Why? because after generating these listings, I can manipulate them and this work of precision cannot be achieved if the data I want to modify is inside a binary file.
A second thing that bugs me about doing a general purpose packer is the way DAN0 can be slightly optimized by packing multiple data tables. To do so, and keep track of every data tables, it'll need to manipulate a table of pointers to identify each part all mixed together into a single file, almost like for a ZIP format. By doing so, a generated DAN0 archive file cannot be included as is in a project, making the packed data bigger for no good reason. The generated archive will need a tool to be converted in a format that a programmer will be able to understand and use in his projects; like using the text and pointers informations for labeling tables in a structured ASM encoded file. Doing a conversion tool to get an ASM listing seems not to be a big deal, except that the ASM listing may not be in the appropriate format for the ASM compiler the programmer want to use. So, I prefer then to make a tools that fits my needs and share the results, instead of making a more general packer that may not be used much at all and need to be update constantly to keep being used.
With all that said, I did program to test the proposed algorithm by decoding and then reencoding data tables in Marcel de Kogel's RLE format. This is why I was able to give you the first interesting results based on the proposed algorithm and compare them with the original RLE encoded data. The program is written in Java and the tables are hard coded into the program, and it's also adapted for the pictures tables, so it's not useful at all except for testing and maybe for some conversions like the one I plan to try for fun later.