git/chunk-format.c

#define USE_THE_REPOSITORY_VARIABLE

#include "git-compat-util.h"
#include "chunk-format.h"
#include "csum-file.h"
#include "gettext.h"
#include "hash.h"
#include "trace2.h"

/*
 * When writing a chunk-based file format, collect the chunks in
 * an array of chunk_info structs. The size stores the _expected_
 * amount of data that will be written by write_fn.
 */
struct chunk_info {};

struct chunkfile {};

struct chunkfile *init_chunkfile(struct hashfile *f)
{}

void free_chunkfile(struct chunkfile *cf)
{}

int get_num_chunks(struct chunkfile *cf)
{}

void add_chunk(struct chunkfile *cf,
	       uint32_t id,
	       size_t size,
	       chunk_write_fn fn)
{}

int write_chunkfile(struct chunkfile *cf, void *data)
{}

int read_table_of_contents(struct chunkfile *cf,
			   const unsigned char *mfile,
			   size_t mfile_size,
			   uint64_t toc_offset,
			   int toc_length,
			   unsigned expected_alignment)
{}

struct pair_chunk_data {};

static int pair_chunk_fn(const unsigned char *chunk_start,
			 size_t chunk_size,
			 void *data)
{}

int pair_chunk(struct chunkfile *cf,
	       uint32_t chunk_id,
	       const unsigned char **p,
	       size_t *size)
{}

int read_chunk(struct chunkfile *cf,
	       uint32_t chunk_id,
	       chunk_read_fn fn,
	       void *data)
{}

uint8_t oid_version(const struct git_hash_algo *algop)
{}