n></h2>

<p>You can train dictionary from samples using <code>train</code> class method.</p>

<pre>::train(samples, :capacity =&gt; 0)</pre>

<p>Please review zstd code before using it. There are many validation requirements and it changes between versions.</p>

<pre class="ruby"><span class="ruby-comment">#buffer</span>
</pre>

<p>There is an attribute reader for buffer. You can use it to store dictionary somewhere.</p>

<pre>::new(buffer)</pre>

<p>Please use regular constructor to create dictionary from 