Samples appends the encoded samples to b and returns the resulting slice. Depending on EnableSTStorage, it writes either a Samples or SamplesV2 record.
(samples []RefSample, b []byte)
| 927 | // Depending on EnableSTStorage, it writes either a Samples or SamplesV2 |
| 928 | // record. |
| 929 | func (e *Encoder) Samples(samples []RefSample, b []byte) []byte { |
| 930 | if e.EnableSTStorage { |
| 931 | return e.samplesV2(samples, b) |
| 932 | } |
| 933 | return e.samplesV1(samples, b) |
| 934 | } |
| 935 | |
| 936 | // samplesV1 appends the encoded samples to b and returns the resulting slice. |
| 937 | func (*Encoder) samplesV1(samples []RefSample, b []byte) []byte { |