File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,11 @@ A decomposer can either serialize the class into bytes or decompose it into obje
117117serializable types. In most cases, it only involves saving members as a list and reconstructing
118118the object from the list.
119119
120+ MessagePack can't handle items larger than 4GB in dict. To work around this issue, FOBS can externalize
121+ the large item and just stores a reference in the buffer. :code: `DatumManager ` is used to handle the
122+ externalized data. For most objects which don't deal with dict items larger than 4GB, the DatumManager
123+ is not needed.
124+
120125Here is an example of a simple decomposer. Even though :code: `datetime ` is not supported
121126by MessagePack, a decomposer is included in `fobs ` module so no need to further decompose it.
122127
@@ -138,10 +143,10 @@ by MessagePack, a decomposer is included in `fobs` module so no need to further
138143 def supported_type(self) -> Type[Any]:
139144 return Simple
140145
141- def decompose(self, obj) -> Any:
146+ def decompose(self, obj, manager ) -> Any:
142147 return [obj.num, obj.name, obj.timestamp]
143148
144- def recompose(self, data: Any) -> Simple:
149+ def recompose(self, data: Any, manager ) -> Simple:
145150 return Simple(data[0], data[1], data[2])
146151
147152
You can’t perform that action at this time.
0 commit comments