Everett
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Functions | Variables
sections.h File Reference

Encodes portable blob sections and retains mmap-backed profile directories. More...

#include <everett/object_writer.h>
#include <everett/profile_blob.h>
#include <everett/word_view.h>
#include <algorithm>
#include <array>
#include <bit>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <memory>
#include <optional>
#include <span>
#include <stdexcept>
#include <string>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  everett::blob_identity
 
struct  everett::section_detail::descriptor
 
struct  everett::section_detail::directory
 
struct  everett::encoded_sections< P >
 
struct  everett::mapped_profile< P, Role >
 
struct  everett::mapped_index< P >
 

Namespaces

namespace  everett
 
namespace  everett::section_detail
 

Typedefs

template<class P >
using everett::mapped_native = mapped_profile< P, stream_role::native >
 

Functions

std::uint64_t everett::section_detail::align (std::uint64_t value) noexcept
 
void everett::section_detail::zero (std::span< std::byte const > bytes, char const *message)
 
unsigned everett::section_detail::hex_value (char c) noexcept
 
void everett::section_detail::put_id (std::span< std::byte > bytes, std::size_t at, object_id const &id)
 
object_id everett::section_detail::get_id (std::span< std::byte const > bytes, std::size_t at)
 
std::span< std::byte const > everett::section_detail::section (std::span< std::byte const > body, directory const &layout, std::size_t slot)
 
template<class P >
directory everett::section_detail::parse (file_header< P > const &header, std::span< std::byte const > body)
 
void everett::section_detail::validate_gaps (std::span< std::byte const > body, directory const &layout)
 
template<class P , stream_role Role>
profile_view< P, Role > everett::section_detail::profile (file_header< P > const &header, std::span< std::byte const > body, directory const &layout)
 
void everett::section_detail::equal_words (word_view actual, std::span< std::uint64_t const > expected, char const *message)
 
template<class P , stream_role Role>
void everett::section_detail::scan_profile (profile_view< P, Role > const &view)
 
template<class P >
encoded_sections< P > everett::encode_native_sections (profile_array< P, stream_role::native > const &native)
 
template<class P >
encoded_sections< P > everett::encode_native_sections (profile_array< P, stream_role::native > const &&)=delete
 
template<class P >
encoded_sections< P > everett::encode_index_sections (profile_blob< P > const &pair, object_id const &native_id, std::optional< blob_identity > exact_target=std::nullopt)
 
template<class P >
encoded_sections< P > everett::encode_index_sections (profile_blob< P > const &&, object_id const &, std::optional< blob_identity >=std::nullopt)=delete
 
template<class P >
encoded_sections< P > everett::encode_index_sections (profile_index< P > const &index, object_id const &native_id, std::optional< blob_identity > exact_target=std::nullopt)
 
template<class P >
encoded_sections< P > everett::encode_index_sections (profile_index< P > const &&, object_id const &, std::optional< blob_identity >=std::nullopt)=delete
 

Variables

constexpr std::uint16_t everett::section_detail::version = 2
 
constexpr std::size_t everett::section_detail::native_directory_bytes = 128
 
constexpr std::size_t everett::section_detail::index_directory_bytes = 256
 
constexpr std::size_t everett::section_detail::native_descriptor_offset = 48
 
constexpr std::size_t everett::section_detail::index_descriptor_offset = 112
 
constexpr std::size_t everett::section_detail::descriptor_bytes = 16
 
constexpr std::size_t everett::section_detail::fc = 0
 
constexpr std::size_t everett::section_detail::low = 1
 
constexpr std::size_t everett::section_detail::high = 2
 
constexpr std::size_t everett::section_detail::samples = 3
 
constexpr std::size_t everett::section_detail::sparse = 4
 
constexpr std::size_t everett::section_detail::classes = 5
 
constexpr std::size_t everett::section_detail::checkpoints = 6
 
constexpr std::size_t everett::section_detail::false_borrows = 7
 
constexpr std::size_t everett::section_detail::cut_lcps = 8
 

Detailed Description

Encodes portable blob sections and retains mmap-backed profile directories.

Author
Edward Kmett ekmet.nosp@m.t@gm.nosp@m.ail.c.nosp@m.om
SPDX-FileType: SOURCE
SPDX-FileCopyrightText: 2026 Edward Kmett <ekmett@gmail.com>
SPDX-License-Identifier: BSD-2-Clause OR Apache-2.0