Rizin
unix-like reverse engineering framework and cli tools
vli.h
Go to the documentation of this file.
1 
17 /*
18  * Author: Lasse Collin
19  *
20  * This file has been put into the public domain.
21  * You can do whatever you want with this file.
22  *
23  * See ../lzma.h for information about liblzma as a whole.
24  */
25 
26 #ifndef LZMA_H_INTERNAL
27 # error Never include this file directly. Use <lzma.h> instead.
28 #endif
29 
30 
34 #define LZMA_VLI_MAX (UINT64_MAX / 2)
35 
39 #define LZMA_VLI_UNKNOWN UINT64_MAX
40 
44 #define LZMA_VLI_BYTES_MAX 9
45 
49 #define LZMA_VLI_C(n) UINT64_C(n)
50 
51 
64 
65 
75 #define lzma_vli_is_valid(vli) \
76  ((vli) <= LZMA_VLI_MAX || (vli) == LZMA_VLI_UNKNOWN)
77 
78 
115 extern LZMA_API(lzma_ret) lzma_vli_encode(lzma_vli vli, size_t *vli_pos,
116  uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
117 
118 
154 extern LZMA_API(lzma_ret) lzma_vli_decode(lzma_vli *vli, size_t *vli_pos,
155  const uint8_t *in, size_t *in_pos, size_t in_size)
156  lzma_nothrow;
157 
158 
165 extern LZMA_API(uint32_t) lzma_vli_size(lzma_vli vli)
const lzma_allocator const uint8_t size_t in_size
Definition: block.h:527
#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
size_t uint8_t * out
Definition: vli.h:116
uint64_t lzma_vli
Variable-length integer type.
Definition: vli.h:63
LZMA_API(lzma_ret) lzma_vli_encode(lzma_vli vli
Encode a variable-length integer.
size_t uint8_t size_t size_t out_size lzma_nothrow
Definition: vli.h:116
size_t const uint8_t * in
Definition: vli.h:155
size_t const uint8_t size_t * in_pos
Definition: vli.h:155
size_t * vli_pos
Definition: vli.h:115
size_t uint8_t size_t * out_pos
Definition: vli.h:116
lzma_ret
Return values used by several functions in liblzma.
Definition: base.h:57