summaryrefslogtreecommitdiff
path: root/midx.h
blob: 17b56172e3cc4c075d74e0814a45e9517284550c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef __MIDX_H__
#define __MIDX_H__

struct multi_pack_index {
	int fd;

	const unsigned char *data;
	size_t data_len;

	uint32_t signature;
	unsigned char version;
	unsigned char hash_len;
	unsigned char num_chunks;
	uint32_t num_packs;
	uint32_t num_objects;

	const unsigned char *chunk_pack_names;

	const char **pack_names;
	char object_dir[FLEX_ARRAY];
};

struct multi_pack_index *load_multi_pack_index(const char *object_dir);

int write_midx_file(const char *object_dir);

#endif