Rizin
unix-like reverse engineering framework and cli tools
index.h
Go to the documentation of this file.
1 
6 /*
7  * Author: Lasse Collin
8  *
9  * This file has been put into the public domain.
10  * You can do whatever you want with this file.
11  *
12  * See ../lzma.h for information about liblzma as a whole.
13  */
14 
15 #ifndef LZMA_H_INTERNAL
16 # error Never include this file directly. Use <lzma.h> instead.
17 #endif
18 
19 
37 typedef struct lzma_index_s lzma_index;
38 
39 
43 typedef struct {
44  struct {
52 
53  const void *reserved_ptr1;
54  const void *reserved_ptr2;
55  const void *reserved_ptr3;
56 
63 
71 
79 
87 
95 
100 
109 
115 
116  struct {
123 
133 
148 
155 
163 
171 
180 
189 
198 
199  lzma_vli reserved_vli1;
200  lzma_vli reserved_vli2;
201  lzma_vli reserved_vli3;
202  lzma_vli reserved_vli4;
203 
204  const void *reserved_ptr1;
205  const void *reserved_ptr2;
206  const void *reserved_ptr3;
207  const void *reserved_ptr4;
208  } block;
209 
210  /*
211  * Internal data which is used to store the state of the iterator.
212  * The exact format may vary between liblzma versions, so don't
213  * touch these in any way.
214  */
215  union {
216  const void *p;
217  size_t s;
219  } internal[6];
221 
222 
226 typedef enum {
269 
270 
286 extern LZMA_API(uint64_t) lzma_index_memusage(
288 
289 
296 extern LZMA_API(uint64_t) lzma_index_memused(const lzma_index *i)
297  lzma_nothrow;
298 
299 
306 extern LZMA_API(lzma_index *) lzma_index_init(const lzma_allocator *allocator)
307  lzma_nothrow;
308 
309 
315 extern LZMA_API(void) lzma_index_end(
317 
318 
343 extern LZMA_API(lzma_ret) lzma_index_append(
347 
348 
365 extern LZMA_API(lzma_ret) lzma_index_stream_flags(
366  lzma_index *i, const lzma_stream_flags *stream_flags)
368 
369 
380 extern LZMA_API(uint32_t) lzma_index_checks(const lzma_index *i)
382 
383 
397 extern LZMA_API(lzma_ret) lzma_index_stream_padding(
400 
401 
405 extern LZMA_API(lzma_vli) lzma_index_stream_count(const lzma_index *i)
407 
408 
415 extern LZMA_API(lzma_vli) lzma_index_block_count(const lzma_index *i)
417 
418 
424 extern LZMA_API(lzma_vli) lzma_index_size(const lzma_index *i)
426 
427 
435 extern LZMA_API(lzma_vli) lzma_index_stream_size(const lzma_index *i)
437 
438 
445 extern LZMA_API(lzma_vli) lzma_index_total_size(const lzma_index *i)
447 
448 
457 extern LZMA_API(lzma_vli) lzma_index_file_size(const lzma_index *i)
459 
460 
464 extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i)
466 
467 
487 extern LZMA_API(void) lzma_index_iter_init(
489 
490 
497 extern LZMA_API(void) lzma_index_iter_rewind(lzma_index_iter *iter)
498  lzma_nothrow;
499 
500 
514 extern LZMA_API(lzma_bool) lzma_index_iter_next(
517 
518 
542 extern LZMA_API(lzma_bool) lzma_index_iter_locate(
544 
545 
567 extern LZMA_API(lzma_ret) lzma_index_cat(lzma_index *dest, lzma_index *src,
570 
571 
577 extern LZMA_API(lzma_index *) lzma_index_dup(
580 
581 
595 extern LZMA_API(lzma_ret) lzma_index_encoder(
598 
599 
628 extern LZMA_API(lzma_ret) lzma_index_decoder(
631 
632 
652 extern LZMA_API(lzma_ret) lzma_index_buffer_encode(const lzma_index *i,
653  uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
654 
655 
683 extern LZMA_API(lzma_ret) lzma_index_buffer_decode(lzma_index **i,
685  const uint8_t *in, size_t *in_pos, size_t in_size)
686  lzma_nothrow;
uint64_t const lzma_allocator const uint8_t size_t * in_pos
Definition: index.h:685
const lzma_allocator lzma_vli lzma_vli uncompressed_size lzma_nothrow lzma_attr_warn_unused_result
Definition: index.h:346
uint8_t size_t * out_pos
Definition: index.h:653
lzma_index ** i
Definition: index.h:629
lzma_index_iter_mode
Operation mode for lzma_index_iter_next()
Definition: index.h:226
@ LZMA_INDEX_ITER_BLOCK
Get the next Block.
Definition: index.h:249
@ LZMA_INDEX_ITER_STREAM
Get the next Stream.
Definition: index.h:238
@ LZMA_INDEX_ITER_NONEMPTY_BLOCK
Get the next non-empty Block.
Definition: index.h:260
@ LZMA_INDEX_ITER_ANY
Get the next Block or Stream.
Definition: index.h:227
uint64_t * memlimit
Definition: index.h:684
lzma_vli blocks lzma_nothrow
Definition: index.h:287
const lzma_allocator * allocator
Definition: index.h:344
const lzma_allocator lzma_vli unpadded_size
Definition: index.h:345
uint64_t const lzma_allocator const uint8_t * in
Definition: index.h:685
LZMA_API(uint64_t) lzma_index_memusage(lzma_vli streams
Calculate memory usage of lzma_index.
lzma_index * src
Definition: index.h:567
uint8_t * out
Definition: index.h:653
const lzma_allocator const uint8_t size_t in_size
Definition: block.h:527
static lzma_stream strm
Definition: full_flush.c:20
voidpf stream
Definition: ioapi.h:138
const char int mode
Definition: ioapi.h:137
#define const
Definition: ansidecl.h:240
char * dest
Definition: lz4.h:697
#define lzma_attr_pure
Definition: lzma.h:265
unsigned int uint32_t
Definition: sftypes.h:29
unsigned long uint64_t
Definition: sftypes.h:28
unsigned char uint8_t
Definition: sftypes.h:31
Custom functions for memory handling.
Definition: base.h:372
Iterator to get information about Blocks and Streams.
Definition: index.h:43
lzma_vli uncompressed_stream_offset
Uncompressed start offset of this Block.
Definition: index.h:170
lzma_vli number
Stream number in the lzma_index.
Definition: index.h:62
const void * reserved_ptr2
Definition: index.h:54
const lzma_stream_flags * flags
Pointer to Stream Flags.
Definition: index.h:51
lzma_vli compressed_file_offset
Compressed start offset of this Block.
Definition: index.h:132
size_t s
Definition: index.h:217
lzma_vli uncompressed_file_offset
Uncompressed start offset of this Block.
Definition: index.h:147
lzma_vli number_in_stream
Block number in this Stream.
Definition: index.h:154
lzma_vli reserved_vli3
Definition: index.h:112
lzma_vli compressed_offset
Compressed start offset of this Stream.
Definition: index.h:78
lzma_vli padding
Size of Stream Padding after this Stream.
Definition: index.h:108
lzma_vli compressed_stream_offset
Compressed start offset of this Block.
Definition: index.h:162
lzma_vli reserved_vli2
Definition: index.h:111
lzma_vli compressed_size
Compressed size of this Stream.
Definition: index.h:94
lzma_vli v
Definition: index.h:218
lzma_vli reserved_vli4
Definition: index.h:113
const void * reserved_ptr3
Definition: index.h:55
lzma_vli unpadded_size
Unpadded size of this Block.
Definition: index.h:188
lzma_vli uncompressed_size
Uncompressed size of this Stream.
Definition: index.h:99
const void * reserved_ptr1
Definition: index.h:53
lzma_vli block_count
Number of Blocks in the Stream.
Definition: index.h:70
lzma_vli uncompressed_offset
Uncompressed start offset of this Stream.
Definition: index.h:86
lzma_vli number_in_file
Block number in the file.
Definition: index.h:122
const void * p
Definition: index.h:216
lzma_vli total_size
Total compressed size.
Definition: index.h:197
lzma_vli reserved_vli1
Definition: index.h:110
const void * reserved_ptr4
Definition: index.h:207
lzma_vli uncompressed_size
Uncompressed size of all the Blocks in the Stream(s)
Definition: index.c:152
Options for encoding/decoding Stream Header and Stream Footer.
Definition: stream_flags.h:33
Passing data to and from liblzma.
Definition: base.h:485
uint64_t stream_padding
Definition: list.c:107
uint64_t streams
Definition: list.c:103
uint64_t uncompressed_size
Definition: list.c:106
uint64_t blocks
Definition: list.c:104
uint64_t lzma_vli
Variable-length integer type.
Definition: vli.h:63
lzma_ret
Return values used by several functions in liblzma.
Definition: base.h:57
unsigned char lzma_bool
Boolean.
Definition: base.h:29