<commit_before>---
layout: post
title: "Python GZIP Peformance"
tags: [Software, Python]
summary: Minor changes that will boost your GZIP performance on text files in Python.
date: 2016-04-27
---
{% include JB/setup %}

I have been testing various ways to read and write text files with GZIP in Python. There were a lot of uninteresting results, but there were two I thought were worth sharing.

### Writing GZIP files<commit_msg>removing date frontmatter<commit_after>---
layout: post
title: "Python GZIP Peformance"
tags: [Software, Python]
summary: Improve your Python GZIP performance on text files.
---
{% include JB/setup %}

I have been testing various ways to read and write text files with GZIP in Python. There were a lot of uninteresting results, but there were two I thought were worth sharing.

### Writing GZIP files
{'fraction_non_alphanumeric': 0.07590361445783132, 'fraction_numerical': 0.00963855421686747, 'mean_word_length': 4.396103896103896, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2129948', 'n_tokens_mistral': 244, 'n_tokens_neox': 225, 'n_words': 120}