-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
miniz not used in the right place #84
Comments
Defining |
Hi, yes, you are right. I think its a leftover from when the code was all in microprofile.h, defining MICROPROFILE_IMPL, with .._MINIZ defined would enable the code. Seems like that functionality was lost when I moved the code to the .cpp file |
So, its the demo thats broken but the feature is not. Same thing for MAX_FRAME_HISTORY |
I have moved the related code to microprofile.cpp, but I think you should know about it and adjust the official repo. :-) |
Not necessary and not enough. You need to put these lines at the beginning of microprofile.cpp: //generate zipped results
#define MICROPROFILE_MINIZ 1
#if MICROPROFILE_MINIZ
#include "miniz.c"
#endif In fact, you can even remove this macro and hard-include miniz.c in microprofile.cpp, if it is not necessary to keep the no-zip option. |
Currently
MICROPROFILE_MINIZ
is defined to 1 in the demos and "miniz.c" is included there. However, no one really uses it. I also checked the web server response and found no deflate.I then moved the
MICROPROFILE_MINIZ
-related stuff to the beginning of microprofile.cpp (I also needed to copy the miniz.c file). Now I can really see "Content-Encoding: deflate" in the HTTP response header.So I think the source and demo files should be changed, and miniz.c should have only one copy and be in the same directory as microprofile.cpp.
The text was updated successfully, but these errors were encountered: