From 446aacf8e8c93f4b0a83d388b79c89b4f116e3da Mon Sep 17 00:00:00 2001 From: JonasIsensee Date: Thu, 13 Aug 2020 08:56:22 +0200 Subject: [PATCH] Add new magic bytes for JLD2 In my opinion it is unlikely for JLD2 to ever become a drop-in replacement for JLD. Definitely not with full backwards compatibility - so it makes sense for the magic bytes to differ by more than just a version number. The changes over at JLD2 are here https://github.com/JuliaIO/JLD2.jl/pull/213 --- src/registry.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/registry.jl b/src/registry.jl index 77f01613..93dd87c3 100644 --- a/src/registry.jl +++ b/src/registry.jl @@ -3,7 +3,8 @@ # data formats add_format(format"JLD", (unsafe_wrap(Vector{UInt8}, "Julia data file (HDF5), version 0.0"), unsafe_wrap(Vector{UInt8}, "Julia data file (HDF5), version 0.1")), ".jld", [:JLD]) -add_format(format"JLD2", "Julia data file (HDF5), version 0.2", ".jld2", [:JLD2]) +add_format(format"JLD2", (unsafe_wrap(Vector{UInt8},"Julia data file (HDF5), version 0.2"), + unsafe_wrap(Vector{UInt8}, "HDF5-based Julia Data Format, version ")), ".jld2", [:JLD2]) add_format(format"GZIP", [0x1f, 0x8b], ".gz", [:Libz]) add_format(format"BSON",(),".bson", [:BSON]) add_format(format"JLSO", (), ".jlso", [:JLSO])