Rizin
unix-like reverse engineering framework and cli tools
container.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 
20 /************
21  * Encoding *
22  ************/
23 
31 #define LZMA_PRESET_DEFAULT UINT32_C(6)
32 
33 
40 #define LZMA_PRESET_LEVEL_MASK UINT32_C(0x1F)
41 
42 
43 /*
44  * Preset flags
45  *
46  * Currently only one flag is defined.
47  */
48 
60 #define LZMA_PRESET_EXTREME (UINT32_C(1) << 31)
61 
62 
66 typedef struct {
75 
80 
105 
136 
144 
152 
161 
162  /*
163  * Reserved space to allow possible future extensions without
164  * breaking the ABI. You should not touch these, because the names
165  * of these variables may change. These are and will never be used
166  * with the currently supported options, so it is safe to leave these
167  * uninitialized.
168  */
184 
185 } lzma_mt;
186 
187 
199 extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset)
201 
202 
215 extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
217 
218 
258 extern LZMA_API(lzma_ret) lzma_easy_encoder(
261 
262 
291 extern LZMA_API(lzma_ret) lzma_easy_buffer_encode(
295  uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
296 
297 
314 extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm,
317 
318 
334 extern LZMA_API(uint64_t) lzma_stream_encoder_mt_memusage(
336 
337 
357 extern LZMA_API(lzma_ret) lzma_stream_encoder_mt(
360 
361 
382 extern LZMA_API(lzma_ret) lzma_alone_encoder(
385 
386 
409 extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size)
410  lzma_nothrow;
411 
412 
439 extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
442  const uint8_t *in, size_t in_size,
443  uint8_t *out, size_t *out_pos, size_t out_size)
445 
446 
447 /************
448  * Decoding *
449  ************/
450 
457 #define LZMA_TELL_NO_CHECK UINT32_C(0x01)
458 
459 
466 #define LZMA_TELL_UNSUPPORTED_CHECK UINT32_C(0x02)
467 
468 
474 #define LZMA_TELL_ANY_CHECK UINT32_C(0x04)
475 
476 
498 #define LZMA_IGNORE_CHECK UINT32_C(0x10)
499 
500 
515 #define LZMA_CONCATENATED UINT32_C(0x08)
516 
517 
536 extern LZMA_API(lzma_ret) lzma_stream_decoder(
539 
540 
561 extern LZMA_API(lzma_ret) lzma_auto_decoder(
564 
565 
584 extern LZMA_API(lzma_ret) lzma_alone_decoder(
587 
588 
627 extern LZMA_API(lzma_ret) lzma_stream_buffer_decode(
629  const lzma_allocator *allocator,
630  const uint8_t *in, size_t *in_pos, size_t in_size,
631  uint8_t *out, size_t *out_pos, size_t out_size)
lzma_check
Type of the integrity check (Check ID)
Definition: check.h:27
lzma_check const lzma_allocator const uint8_t * in
Definition: container.h:294
uint32_t preset
Definition: container.h:259
uint32_t const lzma_allocator const uint8_t size_t * in_pos
Definition: container.h:630
uint32_t lzma_check check lzma_nothrow lzma_attr_warn_unused_result
Definition: container.h:260
lzma_check check
Definition: container.h:292
uint32_t flags
Definition: container.h:628
LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset) lzma_nothrow lzma_attr_pure
Calculate approximate memory usage of easy encoder.
Definition: crc64_fast.c:29
lzma_check const lzma_allocator const uint8_t size_t uint8_t size_t * out_pos
Definition: container.h:295
const lzma_filter * filters
Definition: container.h:315
lzma_check const lzma_allocator * allocator
Definition: container.h:293
lzma_check const lzma_allocator const uint8_t size_t uint8_t size_t size_t out_size lzma_nothrow
Definition: container.h:295
lzma_check const lzma_allocator const uint8_t size_t in_size
Definition: container.h:294
lzma_check const lzma_allocator const uint8_t size_t uint8_t * out
Definition: container.h:295
uint64_t memlimit
Definition: container.h:537
static lzma_stream strm
Definition: full_flush.c:20
#define const
Definition: ansidecl.h:240
static const char struct stat static buf struct stat static buf static vhangup int options
Definition: sflib.h:145
#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
Filter options.
Definition: filter.h:43
Multithreading options.
Definition: container.h:66
uint32_t reserved_int3
Definition: container.h:174
void * reserved_ptr4
Definition: container.h:183
uint32_t flags
Flags.
Definition: container.h:74
uint64_t block_size
Maximum uncompressed size of a Block.
Definition: container.h:104
lzma_reserved_enum reserved_enum3
Definition: container.h:171
uint32_t timeout
Timeout to allow lzma_code() to return early.
Definition: container.h:135
void * reserved_ptr1
Definition: container.h:180
uint64_t reserved_int6
Definition: container.h:177
uint64_t reserved_int5
Definition: container.h:176
lzma_reserved_enum reserved_enum2
Definition: container.h:170
uint32_t reserved_int2
Definition: container.h:173
uint32_t reserved_int4
Definition: container.h:175
uint32_t threads
Number of worker threads to use.
Definition: container.h:79
void * reserved_ptr2
Definition: container.h:181
lzma_reserved_enum reserved_enum1
Definition: container.h:169
uint64_t reserved_int7
Definition: container.h:178
void * reserved_ptr3
Definition: container.h:182
uint32_t preset
Compression preset (level and possible flags)
Definition: container.h:143
uint32_t reserved_int1
Definition: container.h:172
const lzma_filter * filters
Filter chain (alternative to a preset)
Definition: container.h:151
lzma_check check
Integrity check type.
Definition: container.h:160
uint64_t reserved_int8
Definition: container.h:179
Options specific to the LZMA1 and LZMA2 filters.
Definition: lzma12.h:185
Passing data to and from liblzma.
Definition: base.h:485
uint64_t uncompressed_size
Definition: list.c:106
lzma_reserved_enum
Type of reserved enumeration variable in structures.
Definition: base.h:44
lzma_ret
Return values used by several functions in liblzma.
Definition: base.h:57