package zstandard

  1. Overview
  2. Docs
val train : ?dict_size:int -> string array -> 'a Output.t -> 'a

train ?dict_size strings trains a dictionary from an array of samples. dict_size defaults to 100KB, which is a reasonable dictionary size. In general it's recommended to provide a few thousands samples (though this can vary a lot); and it's recommended that the total size of the samples should be around 100x times the target dictionary size.

The underlying C function can raise, in which case this function will raise Error s.