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/* 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
27typedef unsigned char lzma_bool;
28
29
45
46
55typedef enum {
56 LZMA_OK = 0,
73 LZMA_NO_CHECK = 2,
113 LZMA_GET_CHECK = 4,
126 LZMA_MEM_ERROR = 5,
176 LZMA_DATA_ERROR = 9,
195 LZMA_BUF_ERROR = 10,
222 LZMA_PROG_ERROR = 11,
242 LZMA_SEEK_NEEDED = 12,
259 /*
260 * These enumerations may be used internally by liblzma
261 * but they will never be returned to applications.
262 */
272
273
284typedef enum {
285 LZMA_RUN = 0,
299 LZMA_SYNC_FLUSH = 1,
324 LZMA_FULL_FLUSH = 2,
362 LZMA_FINISH = 3
380
381
406typedef struct {
441 void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size);
442
455 void (LZMA_API_CALL *free)(void *opaque, void *ptr);
456
466 void *opaque;
467
469
470
476typedef struct lzma_internal_s lzma_internal;
477
478
519typedef struct {
520 const uint8_t *next_in;
521 size_t avail_in;
522 uint64_t total_in;
524 uint8_t *next_out;
525 size_t avail_out;
526 uint64_t total_out;
537
539 lzma_internal *internal;
540
541 /*
542 * Reserved space to allow possible future extensions without
543 * breaking the ABI. Excluding the initialization of this structure,
544 * you should not touch these, because the names of these variables
545 * may change.
546 */
547
549 void *reserved_ptr1;
550
552 void *reserved_ptr2;
553
555 void *reserved_ptr3;
556
558 void *reserved_ptr4;
559
570 uint64_t seek_pos;
571
573 uint64_t reserved_int2;
574
576 size_t reserved_int3;
577
579 size_t reserved_int4;
580
582 lzma_reserved_enum reserved_enum1;
583
585 lzma_reserved_enum reserved_enum2;
586
588
589
608#define LZMA_STREAM_INIT \
609 { NULL, 0, 0, NULL, 0, 0, NULL, NULL, \
610 NULL, NULL, NULL, NULL, 0, 0, 0, 0, \
611 LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }
612
613
634extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action)
636
637
651extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
652
653
674extern LZMA_API(void) lzma_get_progress(lzma_stream *strm,
675 uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow;
676
677
703extern LZMA_API(uint64_t) lzma_memusage(const lzma_stream *strm)
705
706
719extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm)
721
722
746extern LZMA_API(lzma_ret) lzma_memlimit_set(
747 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