<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://miniscript.org/w/index.php?action=history&amp;feed=atom&amp;title=RawData.byte</id>
	<title>RawData.byte - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://miniscript.org/w/index.php?action=history&amp;feed=atom&amp;title=RawData.byte"/>
	<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=RawData.byte&amp;action=history"/>
	<updated>2026-05-03T21:40:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>http://miniscript.org/w/index.php?title=RawData.byte&amp;diff=1304&amp;oldid=prev</id>
		<title>FR-b0n5a1: Created page with &quot;&lt;c&gt;RawData.byte&lt;/c&gt; gets one unsigned byte from a RawData buffer.  {| class=&quot;wikitable&quot; |- ! Parameter Name !! Type !! Default Value !! Meaning |- | ''offset'' || numb...&quot;</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=RawData.byte&amp;diff=1304&amp;oldid=prev"/>
		<updated>2025-01-30T00:37:33Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;c&amp;gt;&lt;a href=&quot;/wiki/RawData&quot; title=&quot;RawData&quot;&gt;RawData&lt;/a&gt;.byte&amp;lt;/c&amp;gt; gets one unsigned byte from a &lt;a href=&quot;/wiki/RawData&quot; title=&quot;RawData&quot;&gt;RawData&lt;/a&gt; buffer.  {| class=&amp;quot;wikitable&amp;quot; |- ! Parameter Name !! Type !! Default Value !! Meaning |- | &amp;#039;&amp;#039;offset&amp;#039;&amp;#039; || numb...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;c&amp;gt;[[RawData]].byte&amp;lt;/c&amp;gt; gets one unsigned byte from a [[RawData]] buffer.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter Name !! Type !! Default Value !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| ''offset'' || number || 0 || position in buffer at which get the value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;ms&amp;gt;&lt;br /&gt;
PNG_HEADER = [137, 80, 78, 71, 13, 10, 26, 10]&lt;br /&gt;
&lt;br /&gt;
filePath = &amp;quot;/sys/pics/tank.png&amp;quot;&lt;br /&gt;
rawImg = file.loadRaw(filePath)&lt;br /&gt;
&lt;br /&gt;
isPNG = true&lt;br /&gt;
for i in range (0, PNG_HEADER.len - 1)&lt;br /&gt;
	isPNG = isPNG and PNG_HEADER[i] == rawImg.byte(i)&lt;br /&gt;
end for&lt;br /&gt;
&lt;br /&gt;
if isPNG then&lt;br /&gt;
	print filePath + &amp;quot; is a PNG file&amp;quot;&lt;br /&gt;
end if&lt;br /&gt;
&amp;lt;/ms&amp;gt;&lt;br /&gt;
This example loads a file as a [[RawData]] buffer, and then checks the first 8 bytes to determine if it is a PNG file.&lt;br /&gt;
&lt;br /&gt;
See also : [[RawData.setByte]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mini Micro]]&lt;/div&gt;</summary>
		<author><name>FR-b0n5a1</name></author>
		
	</entry>
</feed>