compressed_string_mod module
Provides functions for compressing and decompressing strings, all in memory.
-
compressed_string_mod.compress_string(data, bz2_announced=False)[source]
Compress a string.
If we have xz, try to use it.
Fallback: if we have bz2, try to use that.
Else save without compressing.
Or if the compressed version is larger, save without compressing then too.
-
compressed_string_mod.decompress_string(compressed_data, zero_length_ok=False)[source]
Uncompress a string.