File: benchmark_cgzipreader.py

package info (click to toggle)
python-isal 1.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,796 kB
  • sloc: python: 3,190; ansic: 2,952; makefile: 17
file content (11 lines) | stat: -rw-r--r-- 274 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
import sys

from isal.isal_zlib import _GzipReader

if __name__ == "__main__":
    with open(sys.argv[1], "rb") as f:
        reader = _GzipReader(f, 512 * 1024)
        while True:
            block = reader.read(128 * 1024)
            if not block:
                break