Skip to content

Commit

Permalink
Merge pull request #319 from JuliaIO/fix_get_compressor
Browse files Browse the repository at this point in the history
Update compression.jl
  • Loading branch information
JonasIsensee authored May 23, 2021
2 parents aadeda3 + 40587c4 commit f7a946b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "JLD2"
uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
version = "0.4.6"
version = "0.4.7"

[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Expand Down
8 changes: 3 additions & 5 deletions src/compression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,11 @@ end
get_compressor(compressor) = false, COMPRESSOR_TO_ID[nameof(typeof(compressor))], compressor

function get_compressor(::Bool)
# This method is only called when the argument is true
# No specific compression lib was given. Return the default
if !isdefined(JLD2, :CodecZlib)
m = checked_import(:CodecZlib)
call_again, m = checked_import(:CodecZlib)
if call_again
return true, Base.invokelatest(get_compressor, true)[2:3]...
end
false, COMPRESSOR_TO_ID[:ZlibCompressor], CodecZlib.ZlibCompressor()
false, COMPRESSOR_TO_ID[:ZlibCompressor], m.ZlibCompressor()
end

function get_decompressor(filter_id::UInt16)
Expand Down

2 comments on commit f7a946b

@JonasIsensee
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/37306

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.7 -m "<description of version>" f7a946b0a1969f1ca069c1638135e532ad36c27e
git push origin v0.4.7

Please sign in to comment.