folly/folly/io/RecordIO.cpp

/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * 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 <folly/io/RecordIO.h>

#include <sys/types.h>

#include <folly/Exception.h>
#include <folly/FileUtil.h>
#include <folly/Memory.h>
#include <folly/Portability.h>
#include <folly/ScopeGuard.h>
#include <folly/String.h>
#include <folly/portability/Unistd.h>

namespace folly {

usingnamespacerecordio_helpers;

RecordIOWriter::RecordIOWriter(File file, uint32_t fileId)
    :{}

void RecordIOWriter::write(std::unique_ptr<IOBuf> buf) {}

RecordIOReader::RecordIOReader(File file, uint32_t fileId)
    :{}

RecordIOReader::Iterator::Iterator(ByteRange range, uint32_t fileId, off_t pos)
    :{}

void RecordIOReader::Iterator::advanceToValid() {}

namespace recordio_helpers {

Header;

namespace {

constexpr uint32_t kHashSeed =; // for mcurtiss

uint32_t headerHash(const Header& header) {}

std::pair<size_t, std::size_t> dataLengthAndHash(const IOBuf* buf) {}

std::size_t dataHash(ByteRange range) {}

} // namespace

size_t prependHeader(std::unique_ptr<IOBuf>& buf, uint32_t fileId) {}

bool validateRecordHeader(ByteRange range, uint32_t fileId) {}

RecordInfo validateRecordData(ByteRange range) {}

RecordInfo validateRecord(ByteRange range, uint32_t fileId) {}

RecordInfo findRecord(
    ByteRange searchRange, ByteRange wholeRange, uint32_t fileId) {}

} // namespace recordio_helpers

} // namespace folly