X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=isamc%2Fisamd-p.h;h=746c14c68a6ccb32f0800a401ec06e958d2b544b;hb=afc642709ad7c44f9bce0bbf533d8d76fbb1bcbd;hp=c27a78e14d08f73a26e77d1bfd7b3fc84ec0d31b;hpb=c0a1c79e55f706009113b2de3c11a6f13d4a0e7d;p=idzebra-moved-to-github.git diff --git a/isamc/isamd-p.h b/isamc/isamd-p.h index c27a78e..746c14c 100644 --- a/isamc/isamd-p.h +++ b/isamc/isamd-p.h @@ -1,4 +1,4 @@ -/* $Id: isamd-p.h,v 1.6 1999-08-25 18:09:23 heikki Exp $ +/* $Id: isamd-p.h,v 1.8 1999-09-23 18:01:18 heikki Exp $ * Copyright (c) 1995-1996, Index Data. * See the file LICENSE for details. * Heikki Levanto @@ -72,8 +72,8 @@ struct ISAMD_PP_s { int cat; /* category of this block */ int pos; /* block number of this block */ int next; /* number of the next block */ - int diffs; /* either block or offset (in head) of start of diffs */ - /* will not be used in the improved version! */ + int diffs; /* not used in the modern isam-d, but kept for stats compatibility */ + /* never stored on disk, though */ ISAMD is; void *decodeClientData; /* delta-encoder's own data */ ISAMD_DIFF diffinfo; @@ -86,9 +86,9 @@ struct ISAMD_PP_s { /* == 8 */ #define ISAMD_BLOCK_OFFSET_1 (sizeof(int) + \ sizeof(ISAMD_BLOCK_SIZE) + \ - sizeof(int) + \ sizeof(ISAMD_BLOCK_SIZE)) -/* == 16 */ +/* == 12 (was 16) */ +// sizeof(int) + int isamd_alloc_block (ISAMD is, int cat); @@ -97,6 +97,11 @@ int isamd_read_block (ISAMD is, int cat, int pos, char *dst); int isamd_write_block (ISAMD is, int cat, int pos, char *src); void isamd_free_diffs(ISAMD_PP pp); +int is_singleton(ISAMD_P ipos); +void singleton_decode (int code, struct it_key *k); +int singleton_encode(struct it_key *k); + + #ifdef __cplusplus } #endif @@ -105,7 +110,13 @@ void isamd_free_diffs(ISAMD_PP pp); /* * $Log: isamd-p.h,v $ - * Revision 1.6 1999-08-25 18:09:23 heikki + * Revision 1.8 1999-09-23 18:01:18 heikki + * singleton optimising + * + * Revision 1.7 1999/09/20 15:48:06 heikki + * Small changes + * + * Revision 1.6 1999/08/25 18:09:23 heikki * Starting to optimize * * Revision 1.5 1999/08/20 12:25:58 heikki