Sha256: 8bf8f8b0ed19fc048e5346bd9d362564a24c7b21a91ad1f19ee8c4671bc9bfd9
Contents?: true
Size: 614 Bytes
Versions: 4
Compression:
Stored size: 614 Bytes
Contents
require_relative 'errors' require 'base64' require 'zlib' require_relative 'data/wrapper_struct' require_relative 'data/encoder' require_relative 'data/decoder' module Sym # This module is responsible for taking arbitrary data of any format, and safely compressing # the result of `Marshal.dump(data)` using Zlib, and then doing `#urlsafe_encode64` encoding # to convert it to a string, module Data def encode(data, compress = true) Encoder.new(data, compress).data_encoded end def decode(data_encoded, compress = nil) Decoder.new(data_encoded, compress).data end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
sym-2.0.3 | lib/sym/data.rb |
sym-2.0.2 | lib/sym/data.rb |
sym-2.0.1 | lib/sym/data.rb |
sym-2.0.0 | lib/sym/data.rb |