treaming API: <code>Stream::Writer</code> and <code>Stream::Reader</code>.</p>

<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&quot;zstds&quot;</span>

<span class="ruby-identifier">data</span> = <span class="ruby-constant">ZSTDS</span><span class="ruby-operator">::</span><span class="ruby-constant">String</span>.<span class="ruby-identifier">compress</span> <span class="ruby-string">&quot;sample string&quot;</span>
<span class="ruby-identifier">puts</span> <span c