Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
#!/usr/bin/env python
# Hashplit 2010-04-14: Split a file into separate files using
# directives of the form # file <filename>
import re
import sys
if len(sys.argv) != 2:
exit("""hashplit: Split a file into sub-files
Elias Omega code in Python
Peter Elias, "Universal codeword sets and representations of the integers", IEEE Trans. Information Theory 21(2):194-203, Mar 1975.
Also known as the log* (or "logstar") code in Rohan Baxter's 1996 PhD thesis.
Type 'python' to run the tests.
You can’t perform that action at this time.