Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
base.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
29typedef unsigned char lzma_bool;
30
31
47
48
57typedef enum {
58 LZMA_OK = 0,
75 LZMA_NO_CHECK = 2,
115 LZMA_GET_CHECK = 4,
128 LZMA_MEM_ERROR = 5,
172 LZMA_DATA_ERROR = 9,
191 LZMA_BUF_ERROR = 10,
218 LZMA_PROG_ERROR = 11,
237} lzma_ret;
238
239
250typedef enum {
251 LZMA_RUN = 0,
265 LZMA_SYNC_FLUSH = 1,
290 LZMA_FULL_FLUSH = 2,
328 LZMA_FINISH = 3
346
347
372typedef struct {
407 void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size);
408
421 void (LZMA_API_CALL *free)(void *opaque, void *ptr);
422
432 void *opaque;
433
435
436
443
444
485typedef struct {
486 const uint8_t *next_in;
487 size_t avail_in;
488 uint64_t total_in;
490 uint8_t *next_out;
491 size_t avail_out;
492 uint64_t total_out;
503
506
507 /*
508 * Reserved space to allow possible future extensions without
509 * breaking the ABI. Excluding the initialization of this structure,
510 * you should not touch these, because the names of these variables
511 * may change.
512 */
523
525
526
545#define LZMA_STREAM_INIT \
546 { NULL, 0, 0, NULL, 0, 0, NULL, NULL, \
547 NULL, NULL, NULL, NULL, 0, 0, 0, 0, \
548 LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }
549
550
563extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action)
565
566
580extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
581
582
598extern LZMA_API(void) lzma_get_progress(lzma_stream *strm,
599 uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow;
600
601
624extern LZMA_API(uint64_t) lzma_memusage(const lzma_stream *strm)
626
627
637extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm)
639
640
658extern LZMA_API(lzma_ret) lzma_memlimit_set(
659 lzma_stream *strm, uint64_t memlimit) lzma_nothrow;
Custom functions for memory handling.
Definition base.h:372
void *LZMA_API_CALL * alloc(void *opaque, size_t nmemb, size_t size)
Pointer to a custom memory allocation function.
void * ptr
Definition base.h:421
void * opaque
Pointer passed to .alloc() and .free()
Definition base.h:432
Definition common.h:267
Passing data to and from liblzma.
Definition base.h:485
size_t avail_out
Definition base.h:491
uint64_t reserved_int2
Definition base.h:518
size_t avail_in
Definition base.h:487
void * reserved_ptr1
Definition base.h:513
void * reserved_ptr2
Definition base.h:514
uint64_t total_in
Definition base.h:488
void * reserved_ptr4
Definition base.h:516
lzma_internal * internal
Definition base.h:505
size_t reserved_int3
Definition base.h:519
lzma_reserved_enum reserved_enum1
Definition base.h:521
lzma_reserved_enum reserved_enum2
Definition base.h:522
void * reserved_ptr3
Definition base.h:515
uint64_t total_out
Definition base.h:492
size_t reserved_int4
Definition base.h:520
uint64_t reserved_int1
Definition base.h:517
const lzma_allocator * allocator
Custom memory allocation functions.
Definition base.h:502
uint8_t * next_out
Definition base.h:490
const uint8_t * next_in
Definition base.h:486
size_t size
Definition platform.h:559
#define const
Definition zconf.h:230
lzma_reserved_enum
Type of reserved enumeration variable in structures.
Definition base.h:44
@ LZMA_RESERVED_ENUM
Definition base.h:45
lzma_action action lzma_nothrow lzma_attr_warn_unused_result
Definition base.h:564
uint64_t uint64_t *progress_out lzma_nothrow
Definition base.h:599
lzma_ret
Return values used by several functions in liblzma.
Definition base.h:57
@ LZMA_PROG_ERROR
Programming error.
Definition base.h:218
@ LZMA_DATA_ERROR
Data is corrupt.
Definition base.h:172
@ LZMA_MEM_ERROR
Cannot allocate memory.
Definition base.h:128
@ LZMA_FORMAT_ERROR
Memory usage limit was reached.
Definition base.h:150
@ LZMA_STREAM_END
End of stream was reached.
Definition base.h:63
@ LZMA_UNSUPPORTED_CHECK
Cannot calculate the integrity check.
Definition base.h:90
@ LZMA_BUF_ERROR
No progress is possible.
Definition base.h:191
@ LZMA_MEMLIMIT_ERROR
Definition base.h:140
@ LZMA_GET_CHECK
Integrity check type is now available.
Definition base.h:115
@ LZMA_NO_CHECK
Input stream has no integrity check.
Definition base.h:75
@ LZMA_OPTIONS_ERROR
Invalid or unsupported options.
Definition base.h:160
@ LZMA_OK
Operation completed successfully.
Definition base.h:58
lzma_action
The ‘action’ argument for lzma_code()
Definition base.h:250
@ LZMA_SYNC_FLUSH
Make all the input available at output.
Definition base.h:265
@ LZMA_FINISH
Finish the coding operation.
Definition base.h:328
@ LZMA_RUN
Continue coding.
Definition base.h:251
@ LZMA_FULL_FLUSH
Finish encoding of the current Block.
Definition base.h:290
@ LZMA_FULL_BARRIER
Finish encoding of the current Block.
Definition base.h:305
unsigned char lzma_bool
Boolean.
Definition base.h:29
LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow
Free memory allocated for the coder data structures.
Definition common.c:391
uint64_t * progress_in
Definition base.h:599
uint64_t memlimit
Definition container.h:537
#define LZMA_API_CALL
Definition lzma.h:202
#define lzma_attr_pure
Definition lzma.h:265
lzma_reserved_enum
Type of reserved enumeration variable in structures.
Definition base.h:42