Show More
@@ -119,7 +119,7 b' class SerializeIt(object):' | |||||
119 | elif self.typeDescriptor in ('bytes', 'buffer'): |
|
119 | elif self.typeDescriptor in ('bytes', 'buffer'): | |
120 | self.data = self.obj |
|
120 | self.data = self.obj | |
121 | elif self.typeDescriptor == 'pickle': |
|
121 | elif self.typeDescriptor == 'pickle': | |
122 |
self.data = pickle.dumps(self.obj, |
|
122 | self.data = pickle.dumps(self.obj, -1) | |
123 | else: |
|
123 | else: | |
124 | raise SerializationError("Really wierd serialization error.") |
|
124 | raise SerializationError("Really wierd serialization error.") | |
125 | del self.obj |
|
125 | del self.obj |
@@ -160,7 +160,7 b' def serialize_object(obj, threshold=64e-6):' | |||||
160 | clist = canSequence(obj) |
|
160 | clist = canSequence(obj) | |
161 | slist = map(serialize, clist) |
|
161 | slist = map(serialize, clist) | |
162 | for s in slist: |
|
162 | for s in slist: | |
163 | if s.getDataSize() > threshold: |
|
163 | if s.typeDescriptor in ('buffer', 'ndarray') or s.getDataSize() > threshold: | |
164 | databuffers.append(s.getData()) |
|
164 | databuffers.append(s.getData()) | |
165 | s.data = None |
|
165 | s.data = None | |
166 | return pickle.dumps(slist,-1), databuffers |
|
166 | return pickle.dumps(slist,-1), databuffers |
General Comments 0
You need to be logged in to leave comments.
Login now