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,
178 LZMA_DATA_ERROR = 9,
197 LZMA_BUF_ERROR = 10,
224 LZMA_PROG_ERROR = 11,
244 LZMA_SEEK_NEEDED = 12,
261 /*
262 * These eumerations may be used internally by liblzma
263 * but they will never be returned to applications.
264 */
274
275
286typedef enum {
287 LZMA_RUN = 0,
301 LZMA_SYNC_FLUSH = 1,
326 LZMA_FULL_FLUSH = 2,
364 LZMA_FINISH = 3
382
383
408typedef struct {
443 void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size);
444
457 void (LZMA_API_CALL *free)(void *opaque, void *ptr);
458
468 void *opaque;
469
471
472
478typedef struct lzma_internal_s lzma_internal;
479
480
521typedef struct {
522 const uint8_t *next_in;
523 size_t avail_in;
524 uint64_t total_in;
526 uint8_t *next_out;
527 size_t avail_out;
528 uint64_t total_out;
539
541 lzma_internal *internal;
542
543 /*
544 * Reserved space to allow possible future extensions without
545 * breaking the ABI. Excluding the initialization of this structure,
546 * you should not touch these, because the names of these variables
547 * may change.
548 */
549 void *reserved_ptr1;
550 void *reserved_ptr2;
551 void *reserved_ptr3;
552 void *reserved_ptr4;
553
564 uint64_t seek_pos;
565
566 uint64_t reserved_int2;
567 size_t reserved_int3;
568 size_t reserved_int4;
569 lzma_reserved_enum reserved_enum1;
570 lzma_reserved_enum reserved_enum2;
571
573
574
593#define LZMA_STREAM_INIT \
594 { NULL, 0, 0, NULL, 0, 0, NULL, NULL, \
595 NULL, NULL, NULL, NULL, 0, 0, 0, 0, \
596 LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }
597
598
611extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action)
613
614
628extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
629
630
646extern LZMA_API(void) lzma_get_progress(lzma_stream *strm,
647 uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow;
648
649
672extern LZMA_API(uint64_t) lzma_memusage(const lzma_stream *strm)
674
675
685extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm)
687
688
711extern LZMA_API(lzma_ret) lzma_memlimit_set(
712 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(LZMA_API_CALL *free)(void *opaque
Pointer to a custom memory freeing function.
Definition common.h:267
size_t avail_in
Definition common.h:288
Passing data to and from liblzma.
Definition base.h:485
size_t size
Definition platform.h:559
#define const
Definition zconf.h:230
const lzma_allocator * allocator
Definition common.h:328
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_RET_INTERNAL2
Definition base.h:266
@ LZMA_SEEK_NEEDED
Request to change the input file position.
Definition base.h:244
@ LZMA_RET_INTERNAL4
Definition base.h:268
@ LZMA_RET_INTERNAL1
Definition base.h:265
@ LZMA_RET_INTERNAL7
Definition base.h:271
@ LZMA_RET_INTERNAL3
Definition base.h:267
@ LZMA_RET_INTERNAL5
Definition base.h:269
@ LZMA_RET_INTERNAL6
Definition base.h:270
@ LZMA_RET_INTERNAL8
Definition base.h:272