QBMS Compression
-
- Posts: 320
- Joined: Sun Aug 10, 2014 12:49 pm
QBMS Compression
Hi Aluigi,
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 ?
thx
Mike
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 ?
thx
Mike
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QBMS Compression
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.
So in the next version of quickbms that I will release, it's enough to use something like the following:
Code: Select all
quickbms -s "comtype zlib ; get ZSIZE asize ; xmath SIZE \"ZSIZE * 10\" ; clog \"dump.dat\" 0 ZSIZE SIZE" "" input_file.dat output_folder
*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.
-
- Posts: 320
- Joined: Sun Aug 10, 2014 12:49 pm
Re: QBMS Compression
yeah thx this is perfect exactly i need
And my other question please ? Is it possible to do such a thing about .Net assemblies ?
And my other question please ? Is it possible to do such a thing about .Net assemblies ?
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QBMS Compression
What you mean exactly?
I don't know much about .Net.
I don't know much about .Net.
-
- Posts: 320
- Joined: Sun Aug 10, 2014 12:49 pm
Re: QBMS Compression
for example to use your compressions in .NET as unmanaged code
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QBMS Compression
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
Then you should be able to use them in .NET
-
- Posts: 320
- Joined: Sun Aug 10, 2014 12:49 pm
Re: QBMS Compression
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
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QBMS Compression
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?
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?
-
- Posts: 320
- Joined: Sun Aug 10, 2014 12:49 pm
Re: QBMS Compression
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.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QBMS Compression
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.
For the others I think the easiest solution is to use quickbms.exe that will handle everything.