chromium/components/gwp_asan/common/pack_stack_trace.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/gwp_asan/common/pack_stack_trace.h"

namespace gwp_asan {
namespace internal {

namespace {

// Encode variable-length integer to |out|, returns 0 if there was not enough
// space to finish writing it or the length of the encoded integer otherwise.
size_t VarIntEncode(uintptr_t value, uint8_t* out, size_t out_len) {}

// Decode a variable-length integer to |out|, returns 0 if reading it failed or
// the length of the decoded integer otherwise.
size_t VarIntDecode(const uint8_t* in, size_t in_len, uintptr_t* out) {}

uintptr_t ZigzagEncode(uintptr_t value) {}

uintptr_t ZigzagDecode(uintptr_t value) {}

}  // namespace

size_t Pack(const uintptr_t* unpacked,
            size_t unpacked_size,
            uint8_t* packed,
            size_t packed_max_size) {}

size_t Unpack(const uint8_t* packed,
              size_t packed_size,
              uintptr_t* unpacked,
              size_t unpacked_max_size) {}

}  // namespace internal
}  // namespace gwp_asan