Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
container.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: 0BSD */
2
9/*
10 * Author: Lasse Collin
11 */
12
13#ifndef LZMA_H_INTERNAL
14# error Never include this file directly. Use <lzma.h> instead.
15#endif
16
17
18/************
19 * Encoding *
20 ************/
21
29#define LZMA_PRESET_DEFAULT UINT32_C(6)
30
31
38#define LZMA_PRESET_LEVEL_MASK UINT32_C(0x1F)
39
40
41/*
42 * Preset flags
43 *
44 * Currently only one flag is defined.
45 */
46
58#define LZMA_PRESET_EXTREME (UINT32_C(1) << 31)
59
60
64typedef struct {
80 uint32_t flags;
81
85 uint32_t threads;
86
110 uint64_t block_size;
111
140 uint32_t timeout;
141
148 uint32_t preset;
149
156 const lzma_filter *filters;
157
166
167 /*
168 * Reserved space to allow possible future extensions without
169 * breaking the ABI. You should not touch these, because the names
170 * of these variables may change. These are and will never be used
171 * with the currently supported options, so it is safe to leave these
172 * uninitialized.
173 */
175 lzma_reserved_enum reserved_enum1;
176
178 lzma_reserved_enum reserved_enum2;
179
181 lzma_reserved_enum reserved_enum3;
182
184 uint32_t reserved_int1;
185
187 uint32_t reserved_int2;
188
190 uint32_t reserved_int3;
191
193 uint32_t reserved_int4;
194
225 uint64_t memlimit_threading;
226
236 uint64_t memlimit_stop;
237
239 uint64_t reserved_int7;
240
242 uint64_t reserved_int8;
243
245 void *reserved_ptr1;
246
248 void *reserved_ptr2;
249
251 void *reserved_ptr3;
252
254 void *reserved_ptr4;
255
256} lzma_mt;
257
258
269extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset)
271
272
284extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
286
287
328extern LZMA_API(lzma_ret) lzma_easy_encoder(
331
332
362extern LZMA_API(lzma_ret) lzma_easy_buffer_encode(
365 const uint8_t *in, size_t in_size,
366 uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
367
368
387extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm,
390
391
407extern LZMA_API(uint64_t) lzma_stream_encoder_mt_memusage(
409
410
432extern LZMA_API(lzma_ret) lzma_stream_encoder_mt(
435
436
463
464
490extern LZMA_API(lzma_ret) lzma_alone_encoder(
493
494
522extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size)
524
525
553extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
556 const uint8_t *in, size_t in_size,
557 uint8_t *out, size_t *out_pos, size_t out_size)
559
560
616extern LZMA_API(lzma_ret) lzma_microlzma_encoder(
619
620
621/************
622 * Decoding *
623 ************/
624
631#define LZMA_TELL_NO_CHECK UINT32_C(0x01)
632
633
640#define LZMA_TELL_UNSUPPORTED_CHECK UINT32_C(0x02)
641
642
648#define LZMA_TELL_ANY_CHECK UINT32_C(0x04)
649
650
672#define LZMA_IGNORE_CHECK UINT32_C(0x10)
673
674
689#define LZMA_CONCATENATED UINT32_C(0x08)
690
691
718#define LZMA_FAIL_FAST UINT32_C(0x20)
719
720
742extern LZMA_API(lzma_ret) lzma_stream_decoder(
743 lzma_stream *strm, uint64_t memlimit, uint32_t flags)
745
746
774extern LZMA_API(lzma_ret) lzma_stream_decoder_mt(
775 lzma_stream *strm, const lzma_mt *options)
777
778
813extern LZMA_API(lzma_ret) lzma_auto_decoder(
814 lzma_stream *strm, uint64_t memlimit, uint32_t flags)
816
817
838extern LZMA_API(lzma_ret) lzma_alone_decoder(
839 lzma_stream *strm, uint64_t memlimit)
841
842
898extern LZMA_API(lzma_ret) lzma_lzip_decoder(
899 lzma_stream *strm, uint64_t memlimit, uint32_t flags)
901
902
943extern LZMA_API(lzma_ret) lzma_stream_buffer_decode(
944 uint64_t *memlimit, uint32_t flags,
946 const uint8_t *in, size_t *in_pos, size_t in_size,
947 uint8_t *out, size_t *out_pos, size_t out_size)
949
950
992extern LZMA_API(lzma_ret) lzma_microlzma_decoder(
993 lzma_stream *strm, uint64_t comp_size,
995 uint32_t dict_size) lzma_nothrow;
Custom functions for memory handling.
Definition base.h:372
Filter options.
Definition filter.h:43
Multithreading options.
Definition container.h:66
Options specific to the LZMA1 and LZMA2 filters.
Definition lzma12.h:185
Passing data to and from liblzma.
Definition base.h:485
#define const
Definition zconf.h:230
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
unsigned char lzma_bool
Boolean.
Definition base.h:29
lzma_check
Type of the integrity check (Check ID)
Definition check.h:27
uint64_t memlimit
Definition container.h:537
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
const lzma_filter * filters
Definition container.h:315
lzma_check const lzma_allocator const uint8_t size_t uint8_t size_t * out_pos
Definition container.h:295
lzma_check const lzma_allocator * allocator
Definition container.h:293
uint32_t flags
Definition container.h:628
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
#define lzma_attr_pure
Definition lzma.h:265
#define LZMA_API(type)
Definition lzma.h:207
uint64_t uint64_t uncomp_size
Definition container.h:903
uint64_t uint64_t lzma_bool uncomp_size_is_exact
Definition container.h:903
uint64_t uint64_t lzma_bool uint32_t dict_size
Definition container.h:904
const lzma_options_lzma * options
Definition container.h:545
uint64_t comp_size
Definition container.h:902
uint64_t lzma_mt_block_size(const lzma_filter *filters)
Definition filter_encoder.c:249
uint64_t uncompressed_size
Definition list.c:209