'Python and compression algorithm performance

I'm interessed to this compression algorithm (check the link)

https://github.com/bright-tools/varints

In particular the problem is that the memory overhead for bytearray objects in Python does the compression useless. There is a solution that consider only the size of encoding and NOT the size of data structure? For example:

>>> import sys
>>> list = []
>>> sys.getsizeof(list)
    64

But i would have something like "0" and not 64

How can i avoid the memory overhead? Some come please?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source