JuliaNeuroscience / NIfTI.jl

Julia module for reading/writing NIfTI MRI files
Other
71 stars 35 forks source link

Fixed open mode from w9 to w #48

Closed itan1 closed 3 years ago

itan1 commented 3 years ago

When changing from GZip to CodecZlib the gzopen() method was replaced with open(), but the mode is still "w9". The gzopen() accepts a compression level number in the specified mode, but open() does not. Therefor I changed it to "w".

Fix for Issue #47

Tokazama commented 3 years ago

Thanks! This must have slipped in when switching to the new gz compressor. Would you mind just adding a quick test to make sure we don't accidently break writing compressed files in the future?

itan1 commented 3 years ago

Yes, sure! Shall I also remove the files test/example4d. while I'm on it? I think they are just duplicates of the test/data/example4d. files which are used in runtests.jl?

Tokazama commented 3 years ago

Shall I also remove the files test/example4d. while I'm on it? I think they are just duplicates of the test/data/example4d. files which are used in runtests.jl?

I hope you don't mind, but I went ahead and changed the commit to solve this with a temporary directory that should get cleaned up once julia exits.

This looks good to me. Let me know if you want to make any other changes, otherwise I'll merge.

itan1 commented 3 years ago

Ah, yes good idea. Thanks.

Ready to merge from my side :+1: