(b *testing.B, comp Compressor, input []byte, output *bytes.Buffer)
| 152 | } |
| 153 | |
| 154 | func decompressionBenchmark(b *testing.B, comp Compressor, input []byte, output *bytes.Buffer) { |
| 155 | b.Helper() |
| 156 | b.ReportAllocs() |
| 157 | |
| 158 | rdr := bytes.NewReader(input) |
| 159 | |
| 160 | for b.Loop() { |
| 161 | output.Reset() |
| 162 | |
| 163 | rdr.Reset(input) |
| 164 | |
| 165 | if err := comp.Decompress(output, rdr, true); err != nil { |
| 166 | b.Fatalf("compression error %v", err) |
| 167 | return |
| 168 | } |
| 169 | } |
| 170 | } |
no test coverage detected