Python 3 - Can pickle handle byte objects larger than 4GB?

前端 未结 7 1149
我寻月下人不归
我寻月下人不归 2020-12-01 03:54

Based on this comment and the referenced documentation, Pickle 4.0+ from Python 3.4+ should be able to pickle byte objects larger than 4 GB.

However, using python 3

7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-01 04:48

    You can specify the protocol for the dump. If you do pickle.dump(obj,file,protocol=4) it should work.

提交回复
热议问题