<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Varint on Thibault Meunier</title>
    <link>https://thibault.uk/tags/varint/</link>
    <description>Recent content in Varint on Thibault Meunier</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sat, 18 Apr 2026 08:00:00 +0000</lastBuildDate>
    <atom:link href="https://thibault.uk/tags/varint/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>quicvarint: variable-length integers in TypeScript</title>
      <link>https://thibault.uk/posts/quicvarint-javascript/</link>
      <pubDate>Sat, 18 Apr 2026 08:00:00 +0000</pubDate>
      <guid>https://thibault.uk/posts/quicvarint-javascript/</guid>
      <description>&lt;p&gt;How do you encode an integer on the wire? Fixed-size works until you want to send &lt;code&gt;1&lt;/code&gt; and you&amp;rsquo;re burning 8 bytes on zeroes. Variable-length encoding trades a bit of complexity for smaller payloads.&lt;/p&gt;&#xA;&lt;p&gt;QUIC defines its own scheme in &lt;a href=&#34;https://www.rfc-editor.org/rfc/rfc9000.html#name-variable-length-integer-enc&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;RFC 9000&lt;/a&gt;: the 2-MSB varint. The two most significant bits of the first byte tell you the total length: 1, 2, 4, or 8 bytes. The remaining bits are the value.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
