def encode(data_path, iframe_every=0):
    diffed = diffe.encode(data_path, iframe_every)
    ext = os.path.splitext(diffed)[1]
    bad_path = gz.encode(diffed)
    parts = os.path.splitext(bad_path)
    path = parts[0] + ext + parts[1]
    os.rename(bad_path, path)
    return path
def test_gzip():
    zipped_path = gz.encode(DATA_PATH)
    new_files.append(zipped_path)
    with gzip.open(zipped_path, 'r') as archive:
        text = archive.read()
        assert_equal(text, orig_text)