acasla
acasla

Reputation: 141

Compress string in Python and get details, stats, etc

I need to compress a set of strings in Python and get details, stats, and all the data from the compression to analyze it later (like the substring that appeared more times, the ones that were more useful for the compression, etc).

Right now I am using zlib because it comes with Python - and I didn't found anything in the documentation, but I could change the compression method if I get enough data.

Upvotes: 0

Views: 115

Answers (1)

Mark Adler
Mark Adler

Reputation: 112239

I am not aware of any compressor that collects such information. The search for matching strings, for example, is handled opportunistically, and there is no tracking of the same strings showing up more than once.

Upvotes: 1

Related Questions