container.h (215187) | container.h (223935) |
---|---|
1/** 2 * \file lzma/container.h 3 * \brief File formats 4 */ 5 6/* 7 * Author: Lasse Collin 8 * --- 52 unchanged lines hidden (view full) --- 61 62 63/** 64 * \brief Calculate approximate memory usage of easy encoder 65 * 66 * This function is a wrapper for lzma_raw_encoder_memusage(). 67 * 68 * \param preset Compression preset (level and possible flags) | 1/** 2 * \file lzma/container.h 3 * \brief File formats 4 */ 5 6/* 7 * Author: Lasse Collin 8 * --- 52 unchanged lines hidden (view full) --- 61 62 63/** 64 * \brief Calculate approximate memory usage of easy encoder 65 * 66 * This function is a wrapper for lzma_raw_encoder_memusage(). 67 * 68 * \param preset Compression preset (level and possible flags) |
69 * 70 * \return Number of bytes of memory required for the given 71 * preset when encoding. If an error occurs, for example 72 * due to unsupported preset, UINT64_MAX is returned. |
|
69 */ 70extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset) 71 lzma_nothrow lzma_attr_pure; 72 73 74/** 75 * \brief Calculate approximate decoder memory usage of a preset 76 * 77 * This function is a wrapper for lzma_raw_decoder_memusage(). 78 * 79 * \param preset Compression preset (level and possible flags) | 73 */ 74extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset) 75 lzma_nothrow lzma_attr_pure; 76 77 78/** 79 * \brief Calculate approximate decoder memory usage of a preset 80 * 81 * This function is a wrapper for lzma_raw_decoder_memusage(). 82 * 83 * \param preset Compression preset (level and possible flags) |
84 * 85 * \return Number of bytes of memory required to decompress a file 86 * that was compressed using the given preset. If an error 87 * occurs, for example due to unsupported preset, UINT64_MAX 88 * is returned. |
|
80 */ 81extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset) 82 lzma_nothrow lzma_attr_pure; 83 84 85/** 86 * \brief Initialize .xz Stream encoder using a preset number 87 * --- 55 unchanged lines hidden (view full) --- 143 * \param out Beginning of the output buffer 144 * \param out_pos The next byte will be written to out[*out_pos]. 145 * *out_pos is updated only if encoding succeeds. 146 * \param out_size Size of the out buffer; the first byte into 147 * which no data is written to is out[out_size]. 148 * 149 * \return - LZMA_OK: Encoding was successful. 150 * - LZMA_BUF_ERROR: Not enough output buffer space. | 89 */ 90extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset) 91 lzma_nothrow lzma_attr_pure; 92 93 94/** 95 * \brief Initialize .xz Stream encoder using a preset number 96 * --- 55 unchanged lines hidden (view full) --- 152 * \param out Beginning of the output buffer 153 * \param out_pos The next byte will be written to out[*out_pos]. 154 * *out_pos is updated only if encoding succeeds. 155 * \param out_size Size of the out buffer; the first byte into 156 * which no data is written to is out[out_size]. 157 * 158 * \return - LZMA_OK: Encoding was successful. 159 * - LZMA_BUF_ERROR: Not enough output buffer space. |
160 * - LZMA_UNSUPPORTED_CHECK |
|
151 * - LZMA_OPTIONS_ERROR 152 * - LZMA_MEM_ERROR 153 * - LZMA_DATA_ERROR 154 * - LZMA_PROG_ERROR 155 */ 156extern LZMA_API(lzma_ret) lzma_easy_buffer_encode( 157 uint32_t preset, lzma_check check, 158 lzma_allocator *allocator, const uint8_t *in, size_t in_size, --- 7 unchanged lines hidden (view full) --- 166 * \param filters Array of filters. This must be terminated with 167 * filters[n].id = LZMA_VLI_UNKNOWN. See filter.h for 168 * more information. 169 * \param check Type of the integrity check to calculate from 170 * uncompressed data. 171 * 172 * \return - LZMA_OK: Initialization was successful. 173 * - LZMA_MEM_ERROR | 161 * - LZMA_OPTIONS_ERROR 162 * - LZMA_MEM_ERROR 163 * - LZMA_DATA_ERROR 164 * - LZMA_PROG_ERROR 165 */ 166extern LZMA_API(lzma_ret) lzma_easy_buffer_encode( 167 uint32_t preset, lzma_check check, 168 lzma_allocator *allocator, const uint8_t *in, size_t in_size, --- 7 unchanged lines hidden (view full) --- 176 * \param filters Array of filters. This must be terminated with 177 * filters[n].id = LZMA_VLI_UNKNOWN. See filter.h for 178 * more information. 179 * \param check Type of the integrity check to calculate from 180 * uncompressed data. 181 * 182 * \return - LZMA_OK: Initialization was successful. 183 * - LZMA_MEM_ERROR |
184 * - LZMA_UNSUPPORTED_CHECK |
|
174 * - LZMA_OPTIONS_ERROR 175 * - LZMA_PROG_ERROR 176 */ 177extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm, 178 const lzma_filter *filters, lzma_check check) 179 lzma_nothrow lzma_attr_warn_unused_result; 180 181 --- 63 unchanged lines hidden (view full) --- 245 * \param out Beginning of the output buffer 246 * \param out_pos The next byte will be written to out[*out_pos]. 247 * *out_pos is updated only if encoding succeeds. 248 * \param out_size Size of the out buffer; the first byte into 249 * which no data is written to is out[out_size]. 250 * 251 * \return - LZMA_OK: Encoding was successful. 252 * - LZMA_BUF_ERROR: Not enough output buffer space. | 185 * - LZMA_OPTIONS_ERROR 186 * - LZMA_PROG_ERROR 187 */ 188extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm, 189 const lzma_filter *filters, lzma_check check) 190 lzma_nothrow lzma_attr_warn_unused_result; 191 192 --- 63 unchanged lines hidden (view full) --- 256 * \param out Beginning of the output buffer 257 * \param out_pos The next byte will be written to out[*out_pos]. 258 * *out_pos is updated only if encoding succeeds. 259 * \param out_size Size of the out buffer; the first byte into 260 * which no data is written to is out[out_size]. 261 * 262 * \return - LZMA_OK: Encoding was successful. 263 * - LZMA_BUF_ERROR: Not enough output buffer space. |
264 * - LZMA_UNSUPPORTED_CHECK |
|
253 * - LZMA_OPTIONS_ERROR 254 * - LZMA_MEM_ERROR 255 * - LZMA_DATA_ERROR 256 * - LZMA_PROG_ERROR 257 */ 258extern LZMA_API(lzma_ret) lzma_stream_buffer_encode( 259 lzma_filter *filters, lzma_check check, 260 lzma_allocator *allocator, const uint8_t *in, size_t in_size, --- 152 unchanged lines hidden --- | 265 * - LZMA_OPTIONS_ERROR 266 * - LZMA_MEM_ERROR 267 * - LZMA_DATA_ERROR 268 * - LZMA_PROG_ERROR 269 */ 270extern LZMA_API(lzma_ret) lzma_stream_buffer_encode( 271 lzma_filter *filters, lzma_check check, 272 lzma_allocator *allocator, const uint8_t *in, size_t in_size, --- 152 unchanged lines hidden --- |