Oodle DLL binding

Programming related discussions related to game research
Delutto
Posts: 561
Joined: Tue Oct 13, 2015 1:26 pm

Oodle DLL binding

Post by Delutto »

I'm working in a project which use Oodle data compression and I need to know the functions declaration to call oo2core_4_win64.dll, but I can't find any information on internet...
Looking in QuickBMS sources, there's this two functions:

Code: Select all

OodleLZ_Compress(int algo, unsigned char *in, int insz, unsigned char *out, int max, void *a, void *b, void *c) = NULL;
OodleLZ_Decompress(unsigned char *in, int insz, unsigned char *out, int outsz, int a, int b, int c, void *d, void *e, void *f, void *g, void *h, void *i, int j) = NULL

That's it? And someone have more information about those parameters? Like these "int max, void *a, void *b, void *c" and decompression doesn't need set the algorithm?
PS.: I'm coding in Delphi but any information is useful.

Thanks in advance.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Oodle DLL binding

Post by aluigi »

My oodle.c code available in the source code of quickbms is quite helpful about how to use this dll.
Compression:

Code: Select all

outsz = OodleLZ_Compress(10, in, insz, out, 7, NULL, NULL, NULL);

Decompression:

Code: Select all

outsz = OodleLZ_Decompress(in, insz, out, outsz, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 3 /*3 and 0 are the same*/);
Delutto
Posts: 561
Joined: Tue Oct 13, 2015 1:26 pm

Re: Oodle DLL binding

Post by Delutto »

aluigi wrote:My oodle.c code available in the source code of quickbms is quite helpful about how to use this dll.
Thanks. I had some problems using the x86 version of the dll, so I decided to make a x64 app and is working well. I also found some other interesting material about it and maybe this can help somebody else whoo also interested in this matter:
OodleSharp
Open source Kraken/Mermaid/Selkie/LZNA/BitKnit decompression
Well, I'm not a professional programmer, I'm not a software developer, I'm self-taught and it's just a hobby, and I never maked a commercial application and I don't intend to do it, so I don't understand very well about licenses and copyright. So, here is my question: Can I distribue the Oodle DLL with my tool? I see the dll in quickbms code, it's sutil but is there, this kind of distribuition can be considerate a copyright infringement?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Oodle DLL binding

Post by aluigi »

There were some topics and posts on https://encode.ru about Oodle in which RAD (the developers) were discussing:
https://encode.ru/threads/2577-Open-sou ... #post49929
https://encode.ru/threads/2577-Open-sou ... #post49921

Long story short the developers have no problem with the dll since it's already public and distributed with various games but they are absolutely against any reverse engineering work: https://github.com/github/dmca/blob/mas ... 0-Oodle.md (the repository is still available)

If you use the oodle dll for a commercial game or commercial product... well, that changes everything :)
Delutto
Posts: 561
Joined: Tue Oct 13, 2015 1:26 pm

Re: Oodle DLL binding

Post by Delutto »

Thanks. I'm have a little afraid with this things... now my only concern is about Ubisoft... :lol: