module Bootsnap::CompileCache::YAML

def storage_to_output(data, kwargs)

def storage_to_output(data, kwargs)
  # This could have a meaning in messagepack, and we're being a little lazy
  # about it. -- but a leading 0x04 would indicate the contents of the YAML
  # is a positive integer, which is rare, to say the least.
  if data[0] == 0x04.chr && data[1] == 0x08.chr
    Marshal.load(data)
  else
    msgpack_factory.load(data, **(kwargs || {}))
  end
end