Skip to content

Instantly share code, notes, and snippets.

@cynthia
Created December 26, 2025 21:06
Show Gist options
  • Select an option

  • Save cynthia/126132770400a7b25940ac8960232cba to your computer and use it in GitHub Desktop.

Select an option

Save cynthia/126132770400a7b25940ac8960232cba to your computer and use it in GitHub Desktop.
Synalize It! Grammar for Netflix BIFs
<?xml version="1.0" encoding="UTF-8"?>
<ufwb version="1.17">
<grammar name="Netflix BIF" start="id:1" author="Gemini" fileextension="bif">
<description>Grammar for Netflix Base Index Frames (BIF) files</description>
<structure name="BIF File" id="1" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structure name="Header" id="2" length="64">
<binary name="Magic" id="3" fillcolor="FF2600" length="8">
<fixedvalues>
<fixedvalue name="Signature" value="894249460D0A1A0A"/>
</fixedvalues>
</binary>
<number name="Version" id="4" fillcolor="009193" type="integer" length="4"/>
<number name="Frame Count" id="5" fillcolor="0096FF" type="integer" length="4"/>
<number name="Multiplier" id="6" fillcolor="FF9300" type="integer" length="4"/>
<binary name="Reserved" id="7" fillcolor="8D8D8D" length="44"/>
</structure>
<structure name="Index Table" id="8">
<!-- repeat frameCount + 1 times -->
<structure name="Index Entry" id="9" repeat="id:5" repeatmax="unlimited" repeatmin="0">
<number name="Timestamp" id="10" fillcolor="942192" type="integer" length="4"/>
<offset name="Image Offset" id="11" fillcolor="47D04C" length="4" references="id:12" additional="0"/>
</structure>
<!-- The last entry is the terminator/end offset -->
<structure name="Terminator Entry" id="13">
<number name="End Timestamp" id="14" fillcolor="942192" type="integer" length="4"/>
<number name="End Offset" id="15" fillcolor="47D04C" type="integer" length="4"/>
</structure>
</structure>
<structure name="Images" id="16" order="variable">
<structure name="Image Data" id="12">
<binary name="JPEG Data" id="17" fillcolor="D6D6D6"/>
</structure>
</structure>
</structure>
</grammar>
</ufwb>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment