$id
$id : string
Everything the settings form needs to say about one codec.
Three things together, because an administrator deciding whether a compressor is worth installing needs all three at once and none of them is useful alone: what it costs in size and speed, whether this machine can run it, and if not, the exact command that fixes that.
The reference measurements are shipped figures from a fixed Drupal-shaped corpus, so two hosts can be compared. They are NOT a promise about a particular site: ratio depends heavily on what the content is, and a corpus with a lot of hashes or already-compressed media will do worse than one that is mostly prose and repeated field structure. Calibrator measures the real thing on site data and marks those figures as such, and the form shows both.
__construct(string $id, string $label, string $summary, bool $available, string|null $reason, bool $supportsDictionary, bool $perFrame, array{min: int, max: int, default: int, fast: int, dense: int} $levels, list<\Drupal\strata\Codec\CodecMeasurement> $measurements = [], array$install = [], string|null $documentation = null) : mixed
Constructs a profile.
| string | $id | The codec id as recorded in a frame header. |
| string | $label | Human-readable name for the form. |
| string | $summary | One sentence on what this codec is for. |
| bool | $available | Whether it can run on this host. |
| string|null | $reason | Why it cannot run, or NULL when it can. |
| bool | $supportsDictionary | Whether it accepts a trained dictionary, which is what delta coding needs. |
| bool | $perFrame | Whether it may be chosen for the flush path, as opposed to bulk work only. |
| array{min: int, max: int, default: int, fast: int, dense: int} | $levels | Its level range. |
| list<\Drupal\strata\Codec\CodecMeasurement> | $measurements | Reference figures, and any measured on this host. |
| array |
$install | Platform label keyed to the command that installs it. Empty when it needs no install. |
| string|null | $documentation | Where to read more, or NULL. |
measurement(int $frameSize, bool $dictionary = false, string $level = 'dense') : \Drupal\strata\Codec\CodecMeasurement|null
The measurement closest to a given frame size, preferring one taken on this host.
| int | $frameSize | The frame size to report at. |
| bool | $dictionary | Whether to report the dictionary figure. |
| string | $level | One of "fast", "default" or "dense". |
The best matching measurement, or NULL when none was recorded.
withMeasurements(list<\Drupal\strata\Codec\CodecMeasurement> $measurements) : self
The same profile with extra measurements folded in.
Readonly, so calibration produces a new profile rather than mutating a shared one.
| list<\Drupal\strata\Codec\CodecMeasurement> | $measurements | Measurements to add. |
A new profile carrying both sets.