Module jumpscale.data.serializers.pickle
Expand source code
import pickle
def decompress(obj):
"""dump pickle bytes object into string
Arguments:
obj (pickle bytes) : the pickle bytes which will be dumped
Returns:
string : the string
"""
return pickle.loads(obj)
def compress(obj):
"""loads the data from pickle string into pickle bytes
Arguments:
obj (string) : the string
Returns:
pickle bytes : the loaded data from pickle stram
"""
return pickle.dumps(obj)
Functions
def compress(obj)
-
loads the data from pickle string into pickle bytes
Arguments
obj (string) : the string
Returns
pickle bytes
- the loaded data from pickle stram
Expand source code
def compress(obj): """loads the data from pickle string into pickle bytes Arguments: obj (string) : the string Returns: pickle bytes : the loaded data from pickle stram """ return pickle.dumps(obj)
def decompress(obj)
-
dump pickle bytes object into string
Arguments
obj (pickle bytes) : the pickle bytes which will be dumped
Returns
string
- the string
Expand source code
def decompress(obj): """dump pickle bytes object into string Arguments: obj (pickle bytes) : the pickle bytes which will be dumped Returns: string : the string """ return pickle.loads(obj)