Would it be possible to write to a user provided IO? I skimmed through the signatures of jldopen but I think all of them expects a string. Would make things like this (contrived) example possible:
open("f.jld2", "w") do io
jldopen(io) do jld
write(jld, ...)
end
end