Module: TT::Binary

Defined in:
TT_Lib2/binary.rb

Overview

Since:

  • 2.4.0

Class Method Summary collapse

Class Method Details

.decode64(string) ⇒ Mixed

Parameters:

  • string (String)

Returns:

  • (Mixed)

Since:

  • 2.4.0



32
33
34
# File 'TT_Lib2/binary.rb', line 32

def self.decode64(string)
	return string.unpack('m')[0]
end

.encode64(data) ⇒ String

Parameters:

  • data (Mixed)

Returns:

  • (String)

Since:

  • 2.4.0



21
22
23
# File 'TT_Lib2/binary.rb', line 21

def self.encode64(data)
	return [data].pack('m')
end