Add tests of package iteration
[sbcl.git] / src / runtime / var-io.h
blob3a59d2a169c8798f3cc51f05c2d6b313c7536388
1 /*
2 * This software is part of the SBCL system. See the README file for
3 * more information.
5 * This software is derived from the CMU CL system, which was
6 * written at Carnegie Mellon University and released into the
7 * public domain. The software is in the public domain and is
8 * provided with absolutely no warranty. See the COPYING and CREDITS
9 * files for more information.
12 #ifndef _VAR_IO_H_
13 #define _VAR_IO_H_
15 extern int read_var_integer(unsigned char *source, int *offset);
16 void skip_var_string(unsigned char* source, int *offset);
18 // For streaming varints from a specialized data buffer that is first
19 // delta-encoded, then varint-encoded.
20 struct varint_unpacker {
21 char* data; // pointer to stream of bytes
22 int index; // byte index from start of data
23 int limit; // ending value for 'index'
24 uword_t word; // scratch word used only if the input was a fixnum
27 void varint_unpacker_init(struct varint_unpacker*, lispobj);
28 int varint_unpack(struct varint_unpacker*, int*);
29 void skip_data_stream(struct varint_unpacker* unpacker);
30 unsigned char* decompress_vector(lispobj vector, size_t *result_size);
32 #endif /* _VAR_IO_H_ */