chromium/third_party/perfetto/src/tracing/service/zlib_compressor.cc

/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "src/tracing/service/zlib_compressor.h"

#if !PERFETTO_BUILDFLAG(PERFETTO_ZLIB)
#error "Zlib must be enabled to compile this file."
#endif

#include <zlib.h>

#include "protos/perfetto/trace/trace.pbzero.h"
#include "protos/perfetto/trace/trace_packet.pbzero.h"

namespace perfetto {

namespace {

struct Preamble {};

template <uint32_t id>
Preamble GetPreamble(size_t sz) {}

Slice PreambleToSlice(const Preamble& preamble) {}

// A compressor for `TracePacket`s that uses zlib. The class is exposed for
// testing.
class ZlibPacketCompressor {};

ZlibPacketCompressor::ZlibPacketCompressor() {}

ZlibPacketCompressor::~ZlibPacketCompressor() {}

void ZlibPacketCompressor::PushPacket(const TracePacket& packet) {}

void ZlibPacketCompressor::PushData(const void* data, uint32_t size) {}

TracePacket ZlibPacketCompressor::Finish() {}

void ZlibPacketCompressor::NewOutputSlice() {}

void ZlibPacketCompressor::PushCurSlice() {}

}  // namespace

void ZlibCompressFn(std::vector<TracePacket>* packets) {}

}  // namespace perfetto