diff options
Diffstat (limited to 'src/odb.h')
| -rw-r--r-- | src/odb.h | 19 | 
1 files changed, 19 insertions, 0 deletions
diff --git a/src/odb.h b/src/odb.h new file mode 100644 index 000000000..2f205b20f --- /dev/null +++ b/src/odb.h @@ -0,0 +1,19 @@ +#ifndef INCLUDE_odb_h__ +#define INCLUDE_odb_h__ + +/** First 4 bytes of a pack-*.idx file header. + * + * Note this header exists only in idx v2 and later.  The idx v1 + * file format does not have a magic sequence at the front, and + * must be detected by the first four bytes *not* being this value + * and the first 8 bytes matching the following expression: + * + *   uint32_t *fanout = ... the file data at offset 0 ... + *   ntohl(fanout[0]) < ntohl(fanout[1]) + * + * The value chosen here for PACK_TOC is such that the above + * cannot be true for an idx v1 file. + */ +#define PACK_TOC 0xff744f63 /* -1tOc */ + +#endif  | 
