midx: write object id fanout chunk
[git/git.git] / midx.h
CommitLineData
a3407730
DS
1#ifndef __MIDX_H__
2#define __MIDX_H__
3
4d80560c
DS
4struct multi_pack_index {
5 int fd;
6
7 const unsigned char *data;
8 size_t data_len;
9
10 uint32_t signature;
11 unsigned char version;
12 unsigned char hash_len;
13 unsigned char num_chunks;
14 uint32_t num_packs;
15 uint32_t num_objects;
16
32f3c541 17 const unsigned char *chunk_pack_names;
d7cacf29 18 const uint32_t *chunk_oid_fanout;
0d5b3a5e 19 const unsigned char *chunk_oid_lookup;
32f3c541 20
3227565c 21 const char **pack_names;
4d80560c
DS
22 char object_dir[FLEX_ARRAY];
23};
24
25struct multi_pack_index *load_multi_pack_index(const char *object_dir);
26
a3407730
DS
27int write_midx_file(const char *object_dir);
28
29#endif