<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>archive</title><link>https://archive-w.netlify.app/corner/file-format/</link><description>Recent content on archive</description><generator>Hugo</generator><language>zh-CN</language><atom:link href="https://archive-w.netlify.app/corner/file-format/index.xml" rel="self" type="application/rss+xml"/><item><title/><link>https://archive-w.netlify.app/corner/file-format/riff/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://archive-w.netlify.app/corner/file-format/riff/</guid><description>&lt;ul>
&lt;li>
&lt;h2 id="introriff">
 Intro(RIFF)
 &lt;a class="anchor" href="#introriff">#&lt;/a>
&lt;/h2>
&lt;p class="warn"> 摘自：维基百科
&lt;br>&lt;br>&lt;strong>资源交换文件格式&lt;/strong>（英语：


 &lt;a href="https://en.wikipedia.org/wiki/Resource_Interchange_File_Format" rel="noopener" target="_blank">Resource Interchange File Format&lt;/a>，缩写为 RIFF），又译资源互换文件格式，是一种文件格式（meta-format）标准，把资料存储在被标记的区块（tagged chunks）中。它是在 1991 年时，由 Microsoft 和 IBM 提出。它是 Electronic Arts 在 1985 提出的 Interchange File Format（IFF）的翻版。这两种标准的唯一不同处是在多比特整数的存储方式。 RIFF 使用的是小端序，这是 IBM PC 使用的处理器 80x86 所使用的格式，而 IFF 存储整数的方式是使用大端序，这是 Amiga 和 Apple Macintosh 电脑使用的处理器，68k，可处理的整数类型。
&lt;br>&lt;br>Microsoft在 AVI，WAV，以及接下来要介绍的 


 
 

 
 
 
 
 
 
 
 &lt;a href='../ani/' rel="noopener" class="internal-link" data-src="../ani/">ANI&lt;/a> 这些的文件格式中，都使用 RIFF 的格式当成它们的基础。&lt;/p>
&lt;ul>
&lt;li>
&lt;h3 id="结构组成">
 结构组成
 &lt;a class="anchor" href="#%e7%bb%93%e6%9e%84%e7%bb%84%e6%88%90">#&lt;/a>
&lt;/h3>
&lt;div class="alert callout note">&lt;p class="title">&lt;span class="icon icon-note">&lt;/span> 通用 trunk 结构 &lt;/p>&lt;p> RIFF 文件完全由各种&lt;code>chunk&lt;/code>块组成，truck 是可以 &lt;strong>嵌套&lt;/strong> 的，可以类比文件系统中的文件夹和文件。所有的&lt;code>chunk&lt;/code>都有下面的格式：
&lt;br>&lt;span style='padding-left:2em'>&lt;code>1.&lt;/code> ID(4B)，比如 &lt;code>'RIFF'&lt;/code>，&lt;code>'LIST'&lt;/code>，&lt;code>'anhi'&lt;/code> 等 ASCII 码，字符不够四个 ASCII，则用空格补全，比如&lt;code>'fmt '&lt;/code>,&lt;code>'seq '&lt;/code>。
&lt;br>&lt;span style='padding-left:2em'>&lt;code>2.&lt;/code> SIZE(4B)，当前 chunk 无符号的整形值，尺寸不包括它自身占用的字节数和 ID 的四个字节。
&lt;br>&lt;span style='padding-left:2em'>&lt;code>3.&lt;/code> DATA(*)，当前块包含的数据，长度就是上一个 SIZE(4B) 对应的值。
&lt;br>&lt;span style='padding-left:2em'>&lt;code>4.&lt;/code> 一个填充字节，（可选值）如果当前 chunk 的数据不是偶数的话，会存在这个。例如 


 
 

 
 
 
 
 
 
 
 &lt;a href='#%e7%bb%bc%e5%90%88%e5%9b%be%e4%be%8b' rel="noopener" class="internal-link" data-src="#%e7%bb%bc%e5%90%88%e5%9b%be%e4%be%8b">综合图例&lt;/a> 中的 ID 为 &amp;lsquo;IART&amp;rsquo; 的 truck 后面就有一个填充字节。&lt;/p></description></item><item><title/><link>https://archive-w.netlify.app/corner/file-format/ani/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://archive-w.netlify.app/corner/file-format/ani/</guid><description>&lt;ul>
&lt;li>
&lt;h2 id="introani--animated-cursors--动画光标">
 Intro(ANI | Animated cursors | 动画光标)
 &lt;a class="anchor" href="#introani--animated-cursors--%e5%8a%a8%e7%94%bb%e5%85%89%e6%a0%87">#&lt;/a>
&lt;/h2>
&lt;p class="warn"> 摘自：维基百科
&lt;br>&lt;br>.ANI 文件格式是 Microsoft Windows 操作系统上用于动画鼠标光标的图形文件格式，该格式基于 Microsoft 


 
 

 
 
 
 
 
 
 
 &lt;a href='../riff/' rel="noopener" class="internal-link" data-src="../riff/">资源交换文件&lt;/a> 格式，该格式用作存储动画的单个帧（标准Windows图标）的容器。&lt;/p>
&lt;ul>
&lt;li>
&lt;h3 id="数据结构验证">
 数据结构验证
 &lt;a class="anchor" href="#%e6%95%b0%e6%8d%ae%e7%bb%93%e6%9e%84%e9%aa%8c%e8%af%81">#&lt;/a>
&lt;/h3>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;h2 id="reference">
 Reference
 &lt;a class="anchor" href="#reference">#&lt;/a>
&lt;/h2>
&lt;ul>
&lt;li>


 &lt;a href="https://en.wikipedia.org/wiki/ANI_(file_format)" rel="noopener" target="_blank">https://en.wikipedia.org/wiki/ANI_(file_format)&lt;/a>&lt;/li>
&lt;li>


 &lt;a href="https://www.daubnet.com/en/file-format-ani" rel="noopener" target="_blank">https://www.daubnet.com/en/file-format-ani&lt;/a>&lt;/li>
&lt;li>&lt;/li>
&lt;li>


 &lt;a href="https://sample-files-online.com/samples/ani" rel="noopener" target="_blank">https://sample-files-online.com/samples/ani&lt;/a> [测试文件-ani样例文件]&lt;/li>
&lt;li>


 &lt;a href="https://codesandbox.io/p/sandbox/open-ani-online-v6g3j" rel="noopener" target="_blank">https://codesandbox.io/p/sandbox/open-ani-online-v6g3j&lt;/a> [online load and show ani file]&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul></description></item></channel></rss>