Coverage Report

Created: 2025-10-10 06:44

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/brunsli/c/dec/state.cc
Line
Count
Source
1
// Copyright (c) Google LLC 2020
2
//
3
// Use of this source code is governed by an MIT-style
4
// license that can be found in the LICENSE file or at
5
// https://opensource.org/licenses/MIT.
6
7
#include "./state.h"
8
9
#include <brotli/decode.h>
10
#include "./state_internal.h"
11
12
namespace brunsli {
13
namespace internal {
14
namespace dec {
15
16
18.9k
State::State() : internal(new InternalState()) {}
17
18
0
State::State(State&&) = default;
19
20
18.9k
State::~State() {}
21
22
18.9k
MetadataState::~MetadataState() {
23
18.9k
  if (brotli != nullptr) {
24
2.10k
    BrotliDecoderDestroyInstance(brotli);
25
2.10k
    brotli = nullptr;
26
2.10k
  }
27
18.9k
}
28
29
510k
bool HasSection(const State* state, uint32_t tag) {
30
510k
  return state->internal->section.tags_met & (1u << tag);
31
510k
}
32
33
}  // namespace dec
34
}  // namespace internal
35
}  // namespace brunsli