<div dir="ltr">I tested it now and indeed bytes patterns work on memoryview objects. But how do I use this to scan for patterns through a stream without loading it to memory?</div><br><div class="gmail_quote"><div dir="ltr">On Sun, Oct 7, 2018 at 4:24 PM <<a href="mailto:2015@jmunch.dk">2015@jmunch.dk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 18-10-07 15.11, Ram Rachum wrote:<br>
<br>
 > Unfortunately, it's not helpful. I was developing a solution similar <br>
to yours before I came to the conclusion that a multilne regex would be <br>
more elegant.<br>
<br>
<br>
How about memory mapping your 1GB file?<br>
<br>
bytes patterns work on memoryviews.<br>
<br>
regards, Anders<br>
<br>
<br>
<br>
</blockquote></div>