Skip to content

Commit abc6e8d

Browse files
committed
explanation of infgen sizes
1 parent 2531be3 commit abc6e8d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

common.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ def get_sizes(song_or_key):
4949
return (raw, comp)
5050

5151
def get_inf_sizes(song_or_key):
52-
"""Compression ratio calculated using infgen"""
52+
"""Return raw/compressed sizes used when calculating the infgen-based
53+
compression ratio. Raw size will be the same as above (i.e. just the
54+
number you'd get from `wc -c` on the text file).
55+
The compressed size will be an approximation of the size of the LZ-77
56+
compressed data *before* Huffman coding. Assumes 1 byte per literal, 3
57+
bytes per match."""
5358
if isinstance(song_or_key, basestring):
5459
k = song_or_key
5560
else:

0 commit comments

Comments
 (0)