git/reftable/block.c

/*
Copyright 2020 Google LLC

Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file or at
https://developers.google.com/open-source/licenses/bsd
*/

#include "block.h"

#include "blocksource.h"
#include "constants.h"
#include "record.h"
#include "reftable-error.h"
#include "system.h"
#include <zlib.h>

int header_size(int version)
{}

int footer_size(int version)
{}

static int block_writer_register_restart(struct block_writer *w, int n,
					 int is_restart, struct strbuf *key)
{}

int block_writer_init(struct block_writer *bw, uint8_t typ, uint8_t *buf,
		      uint32_t block_size, uint32_t header_off, int hash_size)
{}

uint8_t block_writer_type(struct block_writer *bw)
{}

/* Adds the reftable_record to the block. Returns -1 if it does not fit, 0 on
   success. Returns REFTABLE_API_ERROR if attempting to write a record with
   empty key. */
int block_writer_add(struct block_writer *w, struct reftable_record *rec)
{}

int block_writer_finish(struct block_writer *w)
{}

int block_reader_init(struct block_reader *br, struct reftable_block *block,
		      uint32_t header_off, uint32_t table_block_size,
		      int hash_size)
{}

void block_reader_release(struct block_reader *br)
{}

uint8_t block_reader_type(const struct block_reader *r)
{}

int block_reader_first_key(const struct block_reader *br, struct strbuf *key)
{}

static uint32_t block_reader_restart_offset(const struct block_reader *br, size_t idx)
{}

void block_iter_seek_start(struct block_iter *it, const struct block_reader *br)
{}

struct restart_needle_less_args {};

static int restart_needle_less(size_t idx, void *_args)
{}

int block_iter_next(struct block_iter *it, struct reftable_record *rec)
{}

void block_iter_reset(struct block_iter *it)
{}

void block_iter_close(struct block_iter *it)
{}

int block_iter_seek_key(struct block_iter *it, const struct block_reader *br,
			struct strbuf *want)
{}

void block_writer_release(struct block_writer *bw)
{}

void reftable_block_done(struct reftable_block *blockp)
{}