<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use JSL to split a contiguous binary file into segments in bytes? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600134#M80360</link>
    <description>&lt;P&gt;If the binary can be segmented after reading, can the following JSL be used?&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;Read the whole b directly, without looping:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	ar[0, 3] = Blob To Matrix( b, "int", 4, "little", 8 )[0, 1];
	ar[0, 4] = Blob To Matrix( b, "int", 4, "little", 8 )[0, 2];
	ar[0, 5] = Blob To Matrix( b, "float", 4, "little", 8 )[0, 3];&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;Thanks!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Mon, 13 Feb 2023 07:56:00 GMT</pubDate>
    <dc:creator>lala</dc:creator>
    <dc:date>2023-02-13T07:56:00Z</dc:date>
    <item>
      <title>How to use JSL to split a contiguous binary file into segments in bytes?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600023#M80349</link>
      <description>&lt;P&gt;This is what happens after reading binary files with JSL:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;It's segmented by 12 bytes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-02-12_20-10-00.png" style="width: 616px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50044i9C278540F1D7D656/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-02-12_20-10-00.png" alt="2023-02-12_20-10-00.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;b = Load Text File( "……\abc.spr", blob() );&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:36:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600023#M80349</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-06-08T16:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL to split a contiguous binary file into segments in bytes?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600036#M80350</link>
      <description>&lt;P&gt;I would guess using &lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/utility-functions.shtml?os=win&amp;amp;source=application#ww2779499" target="_blank" rel="noopener"&gt;Blob Peek&lt;/A&gt; and loop should work. There might also be additional ideas in &lt;LI-MESSAGE title="Importing Binary Data with JSL (2022-EU-45MP-946)" uid="446124" url="https://community.jmp.com/t5/Discovery-Summit-Europe-2022/Importing-Binary-Data-with-JSL-2022-EU-45MP-946/m-p/446124#U446124" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2023 13:37:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600036#M80350</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-02-12T13:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL to split a contiguous binary file into segments in bytes?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600041#M80351</link>
      <description>Thank you for your help! "Blob Peek" is a method I learned about in the last question. Is there a more efficient way? For example regular？</description>
      <pubDate>Sun, 12 Feb 2023 13:52:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600041#M80351</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-02-12T13:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL to split a contiguous binary file into segments in bytes?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600045#M80352</link>
      <description>&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;For example, regular substitution with EmEditor is easy to implement&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-02-12_21-59-57.png" style="width: 645px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50045i7EC17F1C28BD7EDB/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-02-12_21-59-57.png" alt="2023-02-12_21-59-57.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Sun, 12 Feb 2023 14:02:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600045#M80352</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-02-12T14:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL to split a contiguous binary file into segments in bytes?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600053#M80353</link>
      <description>&lt;P&gt;There are only two choices. BlobPeek() and LoadTextfile(... , BLOB( ReadOffsetFromBegin(), ReadLength() ) ).&lt;/P&gt;
&lt;P&gt;Using BlobPeek multiple times is faster than calling LoadTextfile multiple times.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What efficiency concern do you have? How big is the blob? How slow is it?&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2023 17:26:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600053#M80353</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-02-12T17:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL to split a contiguous binary file into segments in bytes?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600133#M80359</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Well, it looks like it can only be done in a circular way.&lt;BR /&gt;There are many such files that need to be written to the JMP table.&lt;BR /&gt;Want to increase speed.&lt;BR /&gt;I wrote JSL&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;b = Load Text File( ……|| "abs.spr", blob() );
s = Length( b ) / 12;
ar = [];
ar = J( s, 5, . );
For( k = 1, k &amp;lt;= s, k++,
	a = Blob Peek( b, (k - 1) * 12, 12 );
	ar[k, 3] = Blob To Matrix( a, "int", 4, "little", 8 )[1, 1];
	ar[k, 4] = Blob To Matrix( a, "int", 4, "little", 8 )[1, 2];
	ar[k, 5] = Blob To Matrix( a, "float", 4, "little", 8 )[1, 3];
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If it is able to implement segmentation&lt;BR /&gt;Does this code increase speed?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 07:47:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600133#M80359</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-02-13T07:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL to split a contiguous binary file into segments in bytes?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600134#M80360</link>
      <description>&lt;P&gt;If the binary can be segmented after reading, can the following JSL be used?&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;Read the whole b directly, without looping:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	ar[0, 3] = Blob To Matrix( b, "int", 4, "little", 8 )[0, 1];
	ar[0, 4] = Blob To Matrix( b, "int", 4, "little", 8 )[0, 2];
	ar[0, 5] = Blob To Matrix( b, "float", 4, "little", 8 )[0, 3];&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;Thanks!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 13 Feb 2023 07:56:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-split-a-contiguous-binary-file-into-segments/m-p/600134#M80360</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-02-13T07:56:00Z</dc:date>
    </item>
  </channel>
</rss>

