We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4ab9ef commit 1b5f2bcCopy full SHA for 1b5f2bc
unblob/file_utils.py
@@ -9,7 +9,6 @@
9
from typing import Iterator, List, Tuple, Union
10
11
from dissect.cstruct import cstruct
12
-from pyperscan import Scan
13
14
from .logging import format_hex
15
@@ -255,9 +254,7 @@ def iterate_file(
255
254
256
def stream_scan(scanner, file: File):
257
"""Scan the whole file by increment of DEFAULT_BUFSIZE using Hyperscan's streaming mode."""
258
- for i in range(0, file.size(), DEFAULT_BUFSIZE):
259
- if scanner.scan(file[i : i + DEFAULT_BUFSIZE]) == Scan.Terminate:
260
- break
+ scanner.scan(file, DEFAULT_BUFSIZE)
261
262
263
class StructParser:
0 commit comments