<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Very good, a way of using logical operators that I was not aware
      of. Even this seems to works:<br>
    </p>
    <p>data(data<32|data>127)=ascii(".")<br>
    </p>
    Thank you also Samuel for fixing the mgeti('l') bug. Both will help
    me a lot in reading and decoding some large seismic files.<br>
    <br>
    Jan Å<br>
    <br>
    <div class="moz-cite-prefix">On 28.08.2016 06:20, Samuel Gougeon
      wrote:<br>
    </div>
    <blockquote cite="mid:57C2668D.4020402@free.fr" type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Hello,<br>
        Here is another (fast) implementation. You get directly all the
        binary blocs of a file in an output list.<br>
        Cheers<br>
        Samuel<br>
        --------------------<br>
        <pre style="font-family:Monospaced;font-style:normal;font-size:12.0;"><big><span style="color:rgb(176,24,19);">function</span> <span style="color:rgb(74,85,219);">[</span><span style="color:rgb(131,67,16);font-weight:bold;">res</span><span style="color:rgb(0,0,0);">, </span><span style="color:rgb(131,67,16);font-weight:bold;">bytes</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(0,0,0);text-decoration:underline;">getBinaryBlocs</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(131,67,16);font-weight:bold;">data</span><span style="color:rgb(0,0,0);">, </span><span style="color:rgb(131,67,16);font-weight:bold;">startstr</span><span style="color:rgb(0,0,0);">, </span><span style="color:rgb(131,67,16);font-weight:bold;">endstr</span><span style="color:rgb(74,85,219);">)</span>
    <span style="color:rgb(0,0,0);">fid</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(50,185,185);">mopen</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(131,67,16);font-weight:bold;">data</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(188,143,143);">'</span><span style="color:rgb(188,143,143);">rb</span><span style="color:rgb(188,143,143);">'</span><span style="color:rgb(74,85,219);">)</span>
    <span style="color:rgb(131,67,16);font-weight:bold;">data</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(0,0,0);">mgeti</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">1e6</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(188,143,143);">'</span><span style="color:rgb(188,143,143);">uc</span><span style="color:rgb(188,143,143);">'</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(0,0,0);">fid</span><span style="color:rgb(74,85,219);">)</span>
    <span style="color:rgb(50,185,185);">mclose</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">fid</span><span style="color:rgb(74,85,219);">)</span>
    <span style="color:rgb(131,67,16);font-weight:bold;">bytes</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(131,67,16);font-weight:bold;">data</span>
    <span style="color:rgb(0,0,0);">s</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(131,67,16);font-weight:bold;">data</span><span style="color:rgb(92,92,92);"><</span><span style="color:rgb(188,143,143);">32</span> <span style="color:rgb(92,92,92);">|</span> <span style="color:rgb(131,67,16);font-weight:bold;">data</span><span style="color:rgb(92,92,92);">></span><span style="color:rgb(188,143,143);">127</span>
    <span style="color:rgb(131,67,16);font-weight:bold;">data</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">s</span><span style="color:rgb(74,85,219);">)</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(50,185,185);">ascii</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">.</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span>
    <span style="color:rgb(74,85,219);"></span></big>
</pre>
      </div>
    </blockquote>
    <br>
  </body>
</html>