Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed the header file was created to allow C & C++ compatibility for this library, but the code itself was much raw C with some exceptions that do not make it possible for it to compile in C.
The following changes were made to make this library compatible with both C++ and C:
<cmath>
in C++, but<math.h>
in C)using namespace std
if C++ (no std:: in C)typedef struct zbuf zbuf; typedef struct zhuffman zhuffman
if C (must be done explicitly in C)(int)your_float
instead ofint(your_float)
struct mixbox_init_t
with what it is supposed to do (calldecompress
)What's next?
mixbox_lut_compressed
with the new codeP.S: When compiling the library in C, you need to link it with math library (
-lm
option in gcc)Have a good day.