Skip to content

Instantly share code, notes, and snippets.

@Ravenslofty
Last active August 29, 2015 14:07
Show Gist options
  • Save Ravenslofty/efd438bb0c18852a8345 to your computer and use it in GitHub Desktop.
Save Ravenslofty/efd438bb0c18852a8345 to your computer and use it in GitHub Desktop.
import json
import lzma
l = []
with open("staff.txt", "r") as infile:
with lzma.open("staff.txt.xz", "w") as outfile:
l = infile.read().split(",")
outfile.write(json.dumps(l).encode("utf-8")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment