Encodes one Marshal document from the same shapes decodeMarshal produces: null,
boolean, number (written as a Fixnum when it is a safe integer, a Float otherwise),
string (a Marshal String, unless wrapped in RubySymbol), Array, Map (a Hash, key
order preserved), and RubyObject.
Every value is written fresh rather than reusing Ruby's own backreference scheme for a
repeated string, symbol or object - valid Marshal either way, since backreferences are an
optional size optimisation, not something a reader is required to produce. A save written
this way is larger than Ruby's own Marshal.dump would make it, never incorrect.
RubyUserDefined (a _dump/_load value) cannot be re-encoded at all, for the same
reason decodeMarshal cannot interpret its bytes: that per-class binary layout is a
second format this module was never taught.
Encodes one Marshal document from the same shapes
decodeMarshalproduces:null,boolean,number(written as a Fixnum when it is a safe integer, a Float otherwise),string(a Marshal String, unless wrapped inRubySymbol),Array,Map(a Hash, key order preserved), andRubyObject.Every value is written fresh rather than reusing Ruby's own backreference scheme for a repeated string, symbol or object - valid Marshal either way, since backreferences are an optional size optimisation, not something a reader is required to produce. A save written this way is larger than Ruby's own
Marshal.dumpwould make it, never incorrect.RubyUserDefined(a_dump/_loadvalue) cannot be re-encoded at all, for the same reasondecodeMarshalcannot interpret its bytes: that per-class binary layout is a second format this module was never taught.