def dump(value, options = {})
      compress = with_fallback(options, :compress)
      marshal = with_fallback(options, :marshal)
      threshold = with_fallback(options, :threshold)

      dumped = deflate(marshal.dump(value), compress, threshold)

      compose(dumped, marshal, compress)
    end
def dump(value, options = {})
      compress = with_fallback(options, :compress)
      marshal = with_fallback(options, :marshal)
      threshold = with_fallback(options, :threshold)

      dumped = deflate(marshal.dump(value), compress, threshold)

      compose(dumped, marshal, compress)
    end
Creates a Readthis::Entity with default options. Each option can be
 overridden later when entities are being dumped.

 Options are sticky, meaning that whatever is used when dumping will
 automatically be used again when loading, regardless of how current
 options are set.

 @option [Boolean] :compress (false) Enable or disable automatic
   compression
 @option [Module]  :marshal (Marshal) Any module that responds to `dump`
   and `load`
 @option [Number]  :threshold (8k) The size a string must be for
   compression

 Output a value prepared for cache storage. Passed options will override
 whatever has been specified for the instance.

 @param [String] value String to dump
 @option options [Boolean] :compress Enable or disable automatic
   compression
 @option options [Module] :marshal Any module that responds to `dump` and
   `load`
 @option options [Number] :threshold The size a string must be for
   compression
 @return [String] The prepared, possibly compressed, string

 @example Dumping a value using defaults

   entity.dump(string)

 @example Dumping a value with overrides

   entity.dump(string, compress: false, marshal: JSON)