Skip to content
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

Remove zlib dependency, MSVC compatbilty #67

Open
sayan1an opened this issue Oct 21, 2020 · 3 comments
Open

Remove zlib dependency, MSVC compatbilty #67

sayan1an opened this issue Oct 21, 2020 · 3 comments

Comments

@sayan1an
Copy link

Could you please add an optional #ifdef to avoid zlib dependency for those looking to use only uncompressed npy save/load? There is no need for zlib.h for just *.npy files.

Something like:

#define CNPY_UNCOMPRESSED_ONLY //Disable compressed archive functionality and zlib dependency
#include "cnpy.h" 

Also for MSVC users, the use of fopen, scanf/sprintf causes compiler issues. Adding the #pragma warning(disable:4996) fixes the problem, but it is recommended to replace these unsafe functions with the safer versions.

@sayan1an
Copy link
Author

I wonder if the project is still active, the last commit was 2 years ago!

@grau4
Copy link

grau4 commented Nov 17, 2020

Same problem here. Did you have any success with removing the zlib dependency? @sayan1an

@sayan1an
Copy link
Author

@grau4 I ended up removing all *.npz functionality by removing all functions which required zlib. It's fairly simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants