029cb50dc92c062463fca543e753992365af3bad
[idzebra-moved-to-github.git] / test / codec / tstcodec.c
1 #include "../index/index.h"
2
3
4 void tst_encode(int num)
5 {
6     struct it_key key;
7     int i;
8     void *codec_handle =iscz1_code_start(ISAMC_ENCODE);
9
10     for (i = 0; i<num; i++)
11     {
12         char dst_buf[200];
13         char *dst = dst_buf;
14         char *src = (char*)  &key;
15
16         key.sysno = num;
17         key.seqno = 1;  
18         iscz1_code_item (ISAMC_ENCODE, codec_handle, &dst, &src);
19     }
20     iscz1_code_stop(ISAMC_ENCODE, codec_handle);
21 }
22
23 int main(int argc, char **argv)
24 {
25     tst_encode(1000000);
26     exit(0);
27 }
28