Most space-efficient way to store log entries

Marc Aymerich glicerinu at gmail.com
Wed Oct 28 18:30:06 EDT 2015


Hi,
I'm writting an application that saves historical state in a log file.
I want to be really efficient in terms of used bytes.

What I'm doing now is:

1) First use zlib.compress
2) And then remove all new lines using binascii.b2a_base64, so I have
a log entry per line.

but b2a_base64 is far from ideal: adds lots of bytes to the compressed
log entry. So, I wonder if perhaps there is a better way to remove new
lines from the zlib output? or maybe a different approach?

Anyone?

Thanks!!
-- 
Marc



More information about the Python-list mailing list