Reduce Python shelve size

十年热恋 提交于 2021-01-27 11:39:25

问题


I'm using the shelve module with gdbm to store Python objects. I understand that shelve uses pickle to store the objects. Unfortunately, the sizes of my shelves are too large. I found this solution to bzip2 or gzip individual pickles. My question is: is there a way to make shelve compress all its pickles?

来源:https://stackoverflow.com/questions/53990501/reduce-python-shelve-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!