getsizeof() gives you only the amount of memory the object has, and not any other values โโreferenced by this object. You will need to rewrite the object to find the total size of all attributes, and all those attributes are saved, etc.
Etching is a serialization format. Serialization must store metadata as well as the contents of an object. The size of the memory and the size of the brine have only a rough correlation.
Sockets are byte streams, if you need a more compact stream stream, use compression.
If you store your pickles in a ZIP archive, your data will already be compressed; compressing the brine before storing it in a ZIP will not help in this case, since already compressed data runs the risk of becoming more significant after additional ZIP compression instead because of the overhead of metadata and the absence of duplicate data in typical compressed data.
source share