I have 1 sugestion to you mate. Is there any chance you can do single file (de)compression natively without the bms sctipt ? Someting like qbms <compression> <type(compress,decompress)> InfileName OutFilename. that would be absolutely perfect
- also to make possible to attach it as assemlby to .Net and use your classes and Unmanaged libs ?
I have just improved the -s option to allow multiple commands using the ';' separator. So in the next version of quickbms that I will release, it's enough to use something like the following:
*update* Note that various decompression algorithms are sensitive to the output uncompressed size, so if you specify a wrong SIZE the algorithm may fail, crash or fill the whole SIZE with bad data.
aluigi wrote:I think you need to compile one or more compression functions as dll with the stdcall calling convention. Then you should be able to use them in .NET
Well i was playing with your qbms code and i have to admin it is over my head. Temporarly i used qbms and wrote special class for it in .NET using compressions, but it is not very friendly sort of speak. It would be nice to actually use qbms to use in .NET projects. This is example i was talking about : http://www.codeproject.com/Articles/141 ... Applicatio
You must not play with all the quickbms code. Check the C and H files in src\compression and check also unz.c. The decompression functions are very simple and usually need only the input buffer, input size, output buffer and often also the output size.
aluigi wrote:You must not play with all the quickbms code. Check the C and H files in src\compression and check also unz.c. The decompression functions are very simple and usually need only the input buffer, input size, output buffer and often also the output size.
What compression algorithms do you need?
Well most common one It would be gr8 all of them but it would be to much work i guess.
zlib/deflate, lzma, bzip, gzip, lz4 and some others already have a .net implementation, others like those of Nintendo are natively in .NET (I translated them to C). For the others I think the easiest solution is to use quickbms.exe that will handle everything.