File: profile_igziplinewriter.py

package info (click to toggle)
python-isal 1.8.0-0.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,768 kB
  • sloc: python: 3,247; ansic: 2,961; makefile: 13
file content (16 lines) | stat: -rw-r--r-- 307 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import cProfile
import os
import sys

from isal import igzip


def main():
    with open(sys.argv[1], mode="rb") as in_file:
        with igzip.open(os.devnull, mode="wb") as gzip_h:
            for line in in_file:
                gzip_h.write(line)


if __name__ == "__main__":
    cProfile.run("main()")